Home   Help Search Login Register  

Author Topic: Lighting a fire and sitting down  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Skorp1on

  • Guest
Lighting a fire and sitting down
« on: 04 Dec 2003, 17:12:00 »
I'm sure that these are very simple scripts, but I have been unable to find them in the OFPEC editing depot. I need a script that will make a soldier light a fire and then sit down next to it. If this is all included in one script, I will also need a script that makes other soldiers sit down, preferably starting off sitting down, at the fire. Any help would be greatly appreciated.

Thanks,
Skorp1on

MadFred

  • Guest
Re:Lighting a fire and sitting down
« Reply #1 on: 04 Dec 2003, 20:03:15 »
don't know bout the light fire command, but to make a soldier sitdown use

unitname playmove "EffectStandSitDown";

if playmove doesnt work try switchmove, can never recall
which one it is. but you'll figure that out.

MadFred

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Lighting a fire and sitting down
« Reply #2 on: 04 Dec 2003, 20:21:34 »
You can't use switchmove in a unit's init field, so for the starting sitting down loons give them a hold waypoint where they start and put it in that.  Each loon will have to be in his own group ..... otherwise they will sit round the fire in wedge formation which would look at bit odd.

As for the loon lighting the fire, you could also do it with waypoints and a little code.   Give him some move waypoints, experiment with the timeout field to get him to stay in the right place for the right length of time.

To light a fire its

fire1 inflame true

To do is scriptwise it would be something like

loon1 domove getpos fire1
@(loon1 distance fire1 < 1)
loon1 playmove "crouchtocombat"   (or something, dunno which one would be best)
~1.5         (that's a guess, experiment to find the right time)
fire1 inflame true
loon1 domove getpos GL1    (GL1 being a gamelogic placed where you want him to sit)
@(loon1 distance GL1 < 1)
loon1 playmove "EffectStandSitDown"
exit

this is very much a sketch rather than a working script, you'll have to play with it, check the syntax and so on.    And of course at the end he'll go straight off to his next waypoint unless you do something about it.... which is why I'd be tempted to use waypoints.    Read snYpir's Friendly Intro to Code Snippets and Johan Gustafsson's Scripting Tutorial - both are essential reading.
Plenty of reviewed ArmA missions for you to play

Skorp1on

  • Guest
Re:Lighting a fire and sitting down
« Reply #3 on: 04 Dec 2003, 22:43:58 »
Thanks, that really helped. I assume a loon is a unit? (I'm new to editing)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Lighting a fire and sitting down
« Reply #4 on: 04 Dec 2003, 22:48:57 »
A loon means a guy....a lad......a boy.

A scottish term.......some areas of Scotland anyway.


Planck
I know a little about a lot, and a lot about a little.

Skorp1on

  • Guest
Re:Lighting a fire and sitting down
« Reply #5 on: 04 Dec 2003, 22:55:52 »
Ok, hey, thanks for the map! Looks like you spent a lot of time on it. I'm going to enjoy making it a purgatorial unforgiving land of suffering and pain! Thanks again.

Loup-Garou

  • Guest
Re:Lighting a fire and sitting down
« Reply #6 on: 05 Dec 2003, 12:21:53 »
"Subject : sit down" ? Thanks, guy ! I finally found  :cheers: !!!!!!!!!! Note : for the fire, you can do it easily in the editor (initialization : this inflame true , if  I remember correctly  ;D ).
« Last Edit: 05 Dec 2003, 12:22:31 by Loup-Garou »

Skorp1on

  • Guest
Re:Lighting a fire and sitting down
« Reply #7 on: 05 Dec 2003, 14:48:09 »
Thanks, i'll try that, i'll let you know if it works.

Pipski

  • Guest
Re:Lighting a fire and sitting down
« Reply #8 on: 05 Dec 2003, 15:12:47 »
You can't use switchmove in a unit's init field, so for the starting sitting down loons give them a hold waypoint where they start and put it in that

I'm using a very old copy of OFP (1.0.0.1) but I've used switchmove for "EffectStandSitDown" in the init field and it works okay.  

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Lighting a fire and sitting down
« Reply #9 on: 05 Dec 2003, 15:58:25 »
Some animations work in the init field and some don't.  
Plenty of reviewed ArmA missions for you to play

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Lighting a fire and sitting down
« Reply #10 on: 05 Dec 2003, 20:17:42 »
A loon means a guy....a lad......a boy.

A scottish term.......some areas of Scotland anyway.


Planck


LMAO  ;D



Skorp1on

  • Guest
Re:Lighting a fire and sitting down
« Reply #11 on: 06 Dec 2003, 02:05:45 »
I tried both the fire and the sit down snippets. I couldn't get them to work all in the same script though.

 unitname inflame true definately works, (in init) and
unitname playmove "EffectStandSitDown" works, but only on a waypoint or trigger (not init). I tried switchmove too, but that didn't work for me. Thanks again guys, my mission is coming along very nicely now, and I owe it to you  ;)
I hope you will enjoy my mission when it's ready. It might come in two parts though, as it's a long mission.