OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 10 Feb 2005, 18:03:56

Title: light
Post by: 456820 on 10 Feb 2005, 18:03:56
ive got some town wich im trying to light up the fires arent working ive put "this inflame true" in the init fields and i was wondering if theres like a script that will light up the town ive read the street light tut in the ed depot but i couldnt find a street light in the town
Title: Re:light
Post by: General Barron on 10 Feb 2005, 20:23:18
The fires should light up using that command. However, if you want to use streetlamps, you should use this very small addon here:
http://ofp.gamezone.cz/index.php?showthis=2551

There is no way to add new streetlamps into the game without using an addon, but that addon is very small, very useful, and very common.
Title: Re:light
Post by: 456820 on 10 Feb 2005, 20:31:08
thanks that worked now i can see what im shooting and where im going cheers
Title: Re:light
Post by: 456820 on 11 Feb 2005, 16:11:04
right another thing is there any other commands to make a fir burn is there a cetain time because ive got the time set as 5:50 in the morning and its pretty dark. and what line could i put foe the whole west side not to fire upon a m2 ive tried "donotfire mg" forEach thislist" doesnt seem to work and im not sure ive got the dont fire command correct
Title: Re:light
Post by: bedges on 11 Feb 2005, 16:26:15
mkay, well first off, could you maybe separate your questions in future to make them easier to get at :P

to light your fire at a certain time -
create a trigger, make the x/y axis 0, and in the 'condition' field put

Code: [Select]
daytime >=0550 and daytime <=0551
then in the 'on activation' field put

Code: [Select]
name_of_fire inflame true
to prevent your mg being fired upon -
in the init line of whatever loon is using the mg put

Code: [Select]
this setcaptive true
that should work. good luck :)
Title: Re:light
Post by: 456820 on 11 Feb 2005, 16:29:09
i only want the mg itself not the person inside it to not be fired upon so once the gunners dead the mg doesnt get fired upon until it blows up and the fire thing do you replace "0550" and "0551" with your own times? or are they set times
Title: Re:light
Post by: bedges on 11 Feb 2005, 16:55:13
does an unmanned enemy mg get shot at? answer (which i just tested) - no.

does a manned enemy mg with 'this setcaptive true' in the init line get shot at? answer (also tested) - no.

the times for the fire are up to you. i used those because you mentioned 05:50.

see how easy this is to read with all the space between lines? :P

you don't have to go





overboard







though ;)

EDIT: just checked giving orders to 'attack mg' - it seems the loons will keep firing even after the mg loon is dead, even if the 'setcaptive' is true.

in general though, if loons are left to their own devices, they'll stop after the mg loon is dead.
Title: Re:light
Post by: 456820 on 11 Feb 2005, 17:02:28
ahh but an unmaned mg can sometimes get shot at as it counts as russian armour so if theres a trigger with a condition of east not present and in the activation field [] exec "script.sqs" for example it wouldnt activate even if the man in the mg gets killed as the mg is still present and is east thats the problem as all my men waste all there ammom on it and it looks stupid
Title: Re:light
Post by: THobson on 11 Feb 2005, 17:08:59
M2 machine guns cn be a pain.  The AI will ofter report them as APCs and will continue to fire at them even after the gunner is dead.  I have used two solutions for this in the past, sometimes using both onthe same gun if it was importantpart of the mission.

1. place an empty M2 gun and a separate soldier, then do a moveInGunner onthe soldier
2. have a trigger that detects when the gunner is dead, the create (or setPos) another empty M2 to the sme location and then deleteVehicle the first one.

I realsie this is abit beyond the original quesiotn which was about how to stop the AI firing on it even whenthe gunner is alive.  I am just anticipating the next possible question.
Title: Re:light
Post by: 456820 on 11 Feb 2005, 17:10:25
thankks i will try them now
Title: Re:light
Post by: Sui on 12 Feb 2005, 01:57:10
Remember that daytime works in hours (and decimals of hours).

So:
Quote
daytime >=0550 and daytime <=0551

should be:
Quote
daytime >= 5.83 and daytime <= 5.85

Seems a bit cumbersome... but you just need to divide the minutes by 60 (50/60 = 8.3, 51/60 = 8.5) ;)
Title: Re:light
Post by: 456820 on 12 Feb 2005, 13:50:49
whats the line to detect wether a ingle unit like a soldier is dead?
Title: Re:light
Post by: Planck on 12 Feb 2005, 13:58:21
Something like:

? !(alive unitname)

or

if not (alive unitname)


Planck
Title: Re:light
Post by: The-Architect on 12 Feb 2005, 20:03:42
U wanna know the simplest way to stop your guys shooting at an MG?

If your West, and you want a Soviet manned Mg, then place an empty West Mg and stick a East guy next to it. Give him a "Get In" waypoint and that's that. Vice Versa for East vs. West MGs.

NOTE;
I havn't tried,

Dude moveingunner MG

It might work, I just havn't tried it.