OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: KEVIN_OFP on 18 Sep 2005, 21:35:37
-
Hello OFP comrades:
Please answer this question. My important mission is on hold until I get the answer. Here it is.
I have enemy AI helicopter going in a CYCLE WAYPOINT. But after about 1/2 hour it crashes because it runs out of fuel. In one of its waypoints, i made it land close to a FUEL truck. but apparantly it doesnt refuel. I think here is where Scripting should come to picture. I know all i have to do is to put a script command inside one of its waypoint to refuel. HOW. please answer.
KEVIN_OFP
-
Sorry, i didnt mean to post this 3 times.
-
you can use the delete button in your first post to remove threads which you dont want anymore. set up a trigger with the following in the condition field:
fuel helicopter > 0.1
and then this in the on activation field:
helicopter action ["Refuel",fueltruck]
this assumes that your helicopter is called helicopter and your fuel truck is called fueltruck.
hope this helps. try and post fewer times next time ;) ;D
-
ok......I'll lock the other 2 topics.
Planck
-
Planck, Thanks for blocking the other 2 posts.
Bored_Onion. thanks for your reply. It didnt work. I had the refuel truck because i thought i need one. but i really dont. so to make it simple. can the heli refuel at one of its wayponts without any truck or trigger. Just a simple script inside one of its waypoints. thanks
I tried this < this "refuel"> isnide one of its waypoints but didnt work.
KEVIN_OFP
-
In my experience choppers will not refuel that way. You need to help them with a:
choppername setFuel 1
instruction
It runs out of fuel after 1/2 hour!! I know with a Cobra and a Hind a full tank is good for about 9 hours.
-
helicopter setfuel 1
edit:
thobson beat me to the point, and with a little extra i might add...oh well, he's always the over-acheiver ;D ;) ::)
-
You are so kind. I should get you to talk with my boss - if only I could fugure out who that is at the moment.
-
The mission that i am about to begin(waiting for an answer) takes about 200 hours to complete. so 9 hours not enough. please where do i put this statement:
choppname setFuel 1
inside the waypoint. or trigger? or if i have to use a fuel truck can u elaborate what and where i put these scripts whether on the heli waypoint, triger, Fueltruck etc. assuming i use an object Fueltruck with do not belong to any sides. thanks
Kevin_ofp
-
Stick it in one of the waypoints. Every time it goes through it'll set the fuel to 1.
-
There are few places you could not put it. It will work in the activation field of a trigger or a waypoint, or you could put it in a script.
As an example (meaning I would not do it this way but it will show you how it works):
create a repeating trigger that has in its condition field
fuel choppername < 0.1
and in the activation field has:
choppername setFuel 1
200 hours! That's well over a week! What mission is that?
-
Hey brother comrades it worked. Thanks Bored_onion, planck, THobosn, triggerhappy and The Architect, ok, time for me to get useful for a change . put this statement in the "On Activation" field of any of its waypointS:
Heliname setFuel 1
assuing the name of the helicopter is Heliname, so it will refuel eveytime it reaches that waypoint.
I wish i could spend time learning scripting hardcore. its just that there are so many other things for me to learn right now(work related , Java, Visual Basic etc.) That why sometimes I wish I had bedges's or macguba's brain.
kEVIN_OFP
-
why would you ever want bedges brain? ;D :-X ;D
-
Hehe, my brain is worth like millions... :P well it should be.