Home   Help Search Login Register  

Author Topic: Problems with Fire  (Read 409 times)

0 Members and 2 Guests are viewing this topic.

viper424044

  • Guest
Problems with Fire
« on: 22 Oct 2003, 01:10:27 »
I have searched for a while now, and I can not find any information on the problem im having.

I am new to editing, and I need a little help.  I need to know how to make a soldier walk up to a small camp fire, and light it.  This is just the regular small campfire that comes with the editor, not an addon.  I dont know how to work scripts in such, so if it is some type of script I need to make this work, a link to one would be nice, and I little info on where to put the script and how to work it

Kaliyuga

  • Guest
Re:Problems with Fire
« Reply #1 on: 22 Oct 2003, 01:18:03 »
Welcome to the forums  viper424044

 I'd suggest this

 name the guy in the editor   ... we'll call him 'g'  in my example..

name the fire in the editor....  say  as  'f'



 now make yourself a trigger...
 
size of  0x0  

in the condition field type this:   g distance f < .5  

in the activation field type this:   f imflame true

 
now when the guy gets within .5 meters of the fire it would light up...

you can also place an animation name in the activation field of the trigger to make it appear as if he were bending to light it if you wanted to ;)  ( g playmove "animationname" ... all the names are in the command reference)

 I'd suggest you also go here:

http://www.ofpec.com/editors/browse.php?category=1_1

if you're just starting to make your own missions.. there are tons of good Tutorials that cover  all the basics ... ;)

check out the one by MacGuba  ;)

:cheers:
« Last Edit: 22 Oct 2003, 01:20:16 by Kaliyuga »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Problems with Fire
« Reply #2 on: 22 Oct 2003, 08:19:31 »
Put this script in your OperationFlashpoint/users/UserName/MissionName/folder be sure to name the script fire.sqs:

Code: [Select]
_unit = _this select 0
_fire = _this select 1

_unit move getpos _fire

@ (_unit distance _fire) < 1

_unit switchmove "StandtoDrop"

~0.5

_fire inflame true

Tadaa! Not sure about the animationname though, you need to look that one up. Of course there are editor ways but I prefer scripting instead of multi triggers.

Now to execute this script you have to put in this in a trigger when you want a guy to light it(NOTE: You don't even have to put a Waypoint to the fire, the script will handle that)

[UnitName,FireName] exec "fire.sqs"

Where UnitName is the name of the guy whos gonna light it and FireName is the name of the fire.

Now, that wasn't so hard, was it?

:beat: *Gets Shot* :beat: