Creating an explosion via script?

Post » Mon Jun 18, 2012 4:11 pm

Anyone know how I would go about placing an explosion at any given point via Papyrus?

Thanks
~Sev
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Mon Jun 18, 2012 5:03 pm

http://www.creationkit.com/PlaceAtMe_-_ObjectReference should work just fine for explosions.

Cipscis
User avatar
TWITTER.COM
 
Posts: 3355
Joined: Tue Nov 27, 2007 3:15 pm

Post » Tue Jun 19, 2012 1:38 am

yeah, look at the code for the scrolls J'zargo gives you, that's a pretty standard example.
User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Mon Jun 18, 2012 4:12 pm

yeah, look at the code for the scrolls J'zargo gives you, that's a pretty standard example.

Cant seem to find it. All I see for Jzargo are his flame cloaks...

http://www.creationkit.com/PlaceAtMe_-_ObjectReference should work just fine for explosions.

Cipscis

I had figured that much, but I didnt realized you could use explosions for it. Sweet
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Mon Jun 18, 2012 6:18 pm

Cant seem to find it. All I see for Jzargo are his flame cloaks...



I had figured that much, but I didnt realized you could use explosions for it. Sweet



It's actually a couple layers deep in "MGRJzargoFireDamageConcAimed"

Scriptname MGRJzargoFlameEffectScript extends ActiveMagicEffect  Explosion Property FireballExplosion  Auto  Keyword Property UndeadKeyword  AutoEvent OnEffectStart(Actor Target, Actor Caster);Cast quest script to access varsMGRJzargoSpell01QuestScript QuestScript = Jzargo01 as MGRJzargoSpell01QuestScript;If spell is hitting an undead target, add on extra explosionif Target.HasKeyword(UndeadKeyword)        Target.PlaceAtMe(FireballExplosion, 1, False, False);and run VCount function on Quest Script    if Jzargo01.GetStage() == 20        QuestScript.VCount()    endifendifEndEventQuest Property Jzargo01  Auto  GlobalVariable Property TestCast  Auto  
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Mon Jun 18, 2012 1:15 pm

Allright. Still not working. Whole script fires and works ( had been originally, I just wanted to make some pretty visuals)

Scriptname SummonScarTeleporter extends ObjectReferenceObjectReference Property DoorToScar  AutoSPELL Property SpellNeeded  AutoObjectReference Property MyMarker AutoExplosion Property myExplosion  AutoEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack,  bool abBashAttack, bool abHitBlocked)If akSource == SpellNeeded   ObjectReference Me = Game.GetPlayer()   MyMarker.MoveTo(Me,0,0,0,true)   self.PlaceAtMe(myExplosion)   DoorToScar.MoveTo(self,0,0,0,false)   self.Delete()EndIfEndEvent

Seems too simple NOT to work, but the explosion isn't spawning.

Edit: And yes, I have linked it.
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Mon Jun 18, 2012 11:03 am

Just to make sure - your explosion property is set up properly in the editor, right?

Cipscis
User avatar
Khamaji Taylor
 
Posts: 3437
Joined: Sun Jul 29, 2007 6:15 am

Post » Mon Jun 18, 2012 5:18 pm

Just to make sure - your explosion property is set up properly in the editor, right?

Cipscis

Yes. Man everyone seems to beat me to the punch before I can hit the SAVE button on the editing.
User avatar
Cartoon
 
Posts: 3350
Joined: Mon Jun 25, 2007 4:31 pm

Post » Tue Jun 19, 2012 12:49 am

PlaceAtMe should have a quantity, otherwise it probably assumes zero. So no explosion.
User avatar
Dustin Brown
 
Posts: 3307
Joined: Sun Sep 30, 2007 6:55 am

Post » Tue Jun 19, 2012 1:27 am

PlaceAtMe should have a quantity, otherwise it probably assumes zero. So no explosion.

The defaults should take care of that, but ill put it in just in case.


Edit: Nope. Still no explosion.

Just an FYI, the explosion DOES work... I am using it on a spell currently and it displays fine.
User avatar
Quick draw II
 
Posts: 3301
Joined: Thu Nov 08, 2007 4:11 pm

Post » Tue Jun 19, 2012 2:08 am

The default value for http://www.creationkit.com/PlaceAtMe_-_ObjectReference's "aiCount" parameter is listed as 1 on the wiki, so I don't expect that to be the problem.

Try calling it on the player instead, perhaps, and see if that works.

Cipscis
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Tue Jun 19, 2012 12:54 am

Nada. Would you mind trying this script to see if it works for you? It seems like every very tiny little thing I absolutely MUST have is bugged.
This neccesarily isnt that important, but I am curious to see if it is just me.

Here:
Scriptname SummonScarTeleporter extends ObjectReferenceObjectReference Property DoorToScar  AutoSPELL Property SpellNeeded  AutoObjectReference Property MyMarker AutoExplosion Property myExplosion  AutoEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack,  bool abBashAttack, bool abHitBlocked)If akSource == SpellNeeded   ObjectReference Me = Game.GetPlayer()   MyMarker.MoveTo(Me,0,0,0,true)   self.PlaceAtMe(myExplosion, 1, false, false)   Me.PlaceAtMe(myExplosion)   DoorToScar.MoveTo(self,0,0,0,false)   self.Delete()EndIfEndEvent


Edit: Bah. Screw the formatting. Cant get it to paste right. Oh well... your copy pasting anyway so its fine.
User avatar
Skrapp Stephens
 
Posts: 3350
Joined: Mon Aug 06, 2007 5:04 am

Post » Mon Jun 18, 2012 4:40 pm

By the way, the examples on the Wiki seem to omit the parentheses a lot...for example, they show the PlaceAtMe example as

player.PlaceAtMe EncWolf 3

Is that an error on the wiki page, or are the parentheses and commas optional?
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Mon Jun 18, 2012 2:48 pm

By the way, the examples on the Wiki seem to omit the parentheses a lot...for example, they show the PlaceAtMe example as

player.PlaceAtMe EncWolf 3

Is that an error on the wiki page, or are the parentheses and commas optional?


That is the version you use ingame via the console. Usually pages like that will have a link below with a (Papyrus) tag.
User avatar
Marcin Tomkow
 
Posts: 3399
Joined: Sun Aug 05, 2007 12:31 pm

Post » Mon Jun 18, 2012 11:18 am

Some console functions have the same name as their Papyrus equivalent. It sounds like you're looking at the documentation for the http://www.creationkit.com/PlaceAtMe of PlaceAtMe instead of the http://www.creationkit.com/PlaceAtMe_-_ObjectReference.

This is something that probably needs to be made clearer on the wiki.

Cipscis
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Mon Jun 18, 2012 12:51 pm

Some console functions have the same name as their Papyrus equivalent. It sounds like you're looking at the documentation for the http://www.creationkit.com/PlaceAtMe of PlaceAtMe instead of the http://www.creationkit.com/PlaceAtMe_-_ObjectReference.

This is something that probably needs to be made clearer on the wiki.

Cipscis

I had figured it was clear with the header lower down linking to the papyrus version... Guess not.
User avatar
Isabella X
 
Posts: 3373
Joined: Sat Dec 02, 2006 3:44 am

Post » Tue Jun 19, 2012 1:39 am

Particularly when you consider that the documentation for console/condition functions looks pretty much identical to the documentation for those functions in the old scripting language, I can see how it might be confusing if you find those pages first. Especially if, say, you search for "PlaceAtMe" and get taken directly to the documentation of the console function.

Cipscis
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Mon Jun 18, 2012 8:45 pm

I guess... Not intending to insult Redwood Elf, or anyone for that matter, but you should ALWAYS read the entire page, especially if you are introducing new content to yourself. If you do that, then I dont see how anyone could miss it.

That aside, Were either of you able to get this darn thing working?
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Mon Jun 18, 2012 6:21 pm

Well I've been struggling with my own octopus for 4 days now, so forgive me for reading the example and thinking "WTF?" It's hard to think clearly when no one even reads the topics you post asking how to use functions that are apparently the only way to do what you need to do.

"FindClosestReferenceOfTypeFromRef" is my current nemesis, but I'd seen the Jzargo scripts before, so I thought I'd point you in the right direction.


You're welcome.
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am


Return to V - Skyrim