Aller au contenu

Photo

Set something on fire


  • Veuillez vous connecter pour répondre
15 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 651 messages
Hey all you pyromaniacs out there. I have seen this plenty of times, on kamal's channel on youtube, on an area prefab(forgot the name) and on the OC of course ot of the City Watch. But I have no idea how to do such at thing.
How do you set something on fire, when you use it, provided you have a fire source equiped or a fire spell?

#2
Tchos

Tchos
  • Members
  • 5 063 messages
It's just a matter of making the object usable, and attaching an On Used script that checks your inventory for a torch (or something) and if you have one, it spawns a fire VFX in the location of the object. Marshall actually demonstrates how to write that kind of code in one of his videos...I believe for the Legends Info plugin.

Yes, it was this one.

Modifié par Tchos, 01 novembre 2013 - 05:47 .


#3
kamal_

kamal_
  • Members
  • 5 254 messages
http://nwvault.ign.c...s.Detail&id=113

#4
andysks

andysks
  • Members
  • 1 651 messages
I watched the video, good and comprehensive as always. I wrote his script down, and added an if statement for the player to have a torch equiped. It didn't work. I didn't take it further, checking for fire weapons etc. One step at a time.

The barrels, I've seen them in the vault. Do they also offer torch options, campfires and stuff like that or is it just explosion?

#5
kamal_

kamal_
  • Members
  • 5 254 messages
You want to light torches and stuff? sls2 is your thing. It has a demo module with tons of examples, and has documentation, as well as a lot of extremely useful prefab lights and effects.
http://nwvault.ign.c...ts.detail&id=16

My stuff extended sls in a few ways I needed (incorporating turning on/off via fire/ice for instance), and fixed a couple bugs (one is an nwn2 bug and not sls' fault). My two fixes are posted in the comments for that stuff, as the sls person no longer is part of nwn2 (I had emailed him about the bugs).

Modifié par kamal_, 01 novembre 2013 - 08:34 .


#6
andysks

andysks
  • Members
  • 1 651 messages
I've also heard of sls. I might implement all these at some point, but I think what I want now is rather easy, for others not for me :D.
There is a farm, with some hay piles around, and I want them to be set on fire, if the player has a torch, or a fire weapon, or casts a fire spell on them.

#7
andysks

andysks
  • Members
  • 1 651 messages
I was just reading the documentation on SLS and I think it will do the job, plus many other thing.

#8
kamal_

kamal_
  • Members
  • 5 254 messages
The fireball spell was invented when some wizard thought "I'd really like to set that guy on fire, but he's way over there".

#9
Tchos

Tchos
  • Members
  • 5 063 messages
Backing up a bit, one possible reasons the script might not work is if you're trying to reference a placeable that's set to "static", or one that has 0 hit points. Or, since you say you're doing it on hay piles, the fire effect might be too small and is appearing under the hay, where you can't see it, because the origin point for the effect would be at the bottom of the hay pile. You can specify a higher location, or use a larger effect.

#10
Morbane

Morbane
  • Members
  • 1 883 messages

kamal_ wrote...

The fireball spell was invented when some wizard thought "I'd really like to set that guy on fire, but he's way over there".


I wonder what that same wizard was thinking when he cast Blade Barrier?

:devil:

#11
andysks

andysks
  • Members
  • 1 651 messages
I made it work... but I am not sure if I can use it. On an area prefab I downloaded, I found out that there is such a thing, but for braziers, and it is also a quest included and encounters as well when you light them. It is an area intended for Misery Stone, Dwarven Ruins it"s called.
I just tried to test the script in there, written by sunjammer I think, by commenting out the Misery Stone specific parts, and add a bigger fire effect instead of the fireplace one, since I was going to make it work on hay piles.
It worked, but I am not sure if the people that created it are still around here to ask them if I can use it. On the other hand, it was included on an area prefab...

#12
kamal_

kamal_
  • Members
  • 5 254 messages

Morbane wrote...

kamal_ wrote...

The fireball spell was invented when some wizard thought "I'd really like to set that guy on fire, but he's way over there".


I wonder what that same wizard was thinking when he cast Blade Barrier?

:devil:

"I'm glad I took a bunch of cleric levels" :P

#13
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
In my Silverwand Sample Campaign in the Vault I have wall torches that can be lit by hand-held torch or fire weaponry. It isn't a system, just some properties and an on use script named bb_onused. It allows lighting candles as well as tiki torches, so it should be simple for you to add an additional effect for hay piles.

Regards

#14
andysks

andysks
  • Members
  • 1 651 messages
Thanks Kaldor, The Sample Campaign sits in my folder, I never played it but I have opened it with the toolset plenty of times to get some general information on how to do stuff. This script I missed apparently :).

#15
Morbane

Morbane
  • Members
  • 1 883 messages

kamal_ wrote...

Morbane wrote...

kamal_ wrote...

The fireball spell was invented when some wizard thought "I'd really like to set that guy on fire, but he's way over there".


I wonder what that same wizard was thinking when he cast Blade Barrier?

:devil:

"I'm glad I took a bunch of cleric levels" :P


ya... i meant to say - what would a wizard say if he could cast blade barrier - ya thats the ticket:whistle:

#16
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
For lighting and unlighting on fire damage you can use my aptly named bb_ondamaged script.

Regards