Home   Help Search Login Register  

Author Topic: Script for refuel  (Read 1182 times)

0 Members and 1 Guest are viewing this topic.

KEVIN_OFP

  • Guest
Script for refuel
« 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

KEVIN_OFP

  • Guest
Re:Script for refuel
« Reply #1 on: 18 Sep 2005, 21:37:42 »
Sorry, i didnt mean to post this 3 times.

bored_onion

  • Guest
Re:Script for refuel
« Reply #2 on: 18 Sep 2005, 21:41:38 »
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:

Code: [Select]
fuel helicopter > 0.1
and then this in the on activation field:

Code: [Select]
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
« Last Edit: 18 Sep 2005, 21:47:56 by bored_onion »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Script for refuel
« Reply #3 on: 18 Sep 2005, 21:55:42 »
ok......I'll lock the other 2 topics.


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

KEVIN_OFP

  • Guest
Re:Script for refuel
« Reply #4 on: 18 Sep 2005, 22:18:11 »
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

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Script for refuel
« Reply #5 on: 18 Sep 2005, 23:15:58 »
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.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Script for refuel
« Reply #6 on: 18 Sep 2005, 23:16:09 »
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 ;) ::)
« Last Edit: 18 Sep 2005, 23:17:28 by Triggerhappy »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Script for refuel
« Reply #7 on: 19 Sep 2005, 00:08:44 »
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.

KEVIN_OFP

  • Guest
Re:Script for refuel
« Reply #8 on: 19 Sep 2005, 00:19:52 »
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

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Script for refuel
« Reply #9 on: 19 Sep 2005, 00:26:44 »
Stick it in one of the waypoints. Every time it goes through it'll set the fuel to 1.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Script for refuel
« Reply #10 on: 19 Sep 2005, 00:28:20 »
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?

KEVIN_OFP

  • Guest
Re:Script for refuel
« Reply #11 on: 19 Sep 2005, 01:00:08 »
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

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Script for refuel
« Reply #12 on: 19 Sep 2005, 01:18:47 »
why would you ever want bedges brain? ;D :-X ;D

Kyle Sarnik

  • Guest
Re:Script for refuel
« Reply #13 on: 19 Sep 2005, 04:44:32 »
Hehe, my brain is worth like millions...  :P well it should be.