OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dave52390 on 12 Aug 2004, 14:36:03
-
:gunman: HI, none of these ""HALO"" scripts work for me can you plz explain how to do it to me plz....... and also how do i add a flag to some ones back? thanks :help: :tomato:
-
Which HALO Script?
:beat: *Gets Shot* :beat:
-
I'v tryed around 5 of them if you cna give me one that works and explain how to do it that would be great.. thanks
-
They all work. ;D
I suspect the reason they don't work for you is that you don't really understand what you need to do to make them work. Before going any further head over to the Editors Depot and read snYpir's A Friendly Intro to Code Snippets and Johan Gusafsson's Scripting Tutorial.
Most scripts of this nature come with instructions and in general there is little or nothing we can add to these instructions. If you get stuck we'd be glad to help, but you need to tell us precisely which script you are trying to use, what you did, and - in detail - what went right and what went wrong. ;) If there are parts of the instructions that you can't figure out then post the relevant part here and tell us exactly what the problem is.
-
it would be this script... wont work......
IMPORTANT! - This script calls itself (executes itself), so if you rename the script,
you need to edit the contents of the script so that it can still call itself!
WHAT: A single script which simulates a REAL HALO drop for both AI and player units.
HOW: Initialize it like so: ["name",height,variance,failrate] exec "real_halo.xsqs"
"name" = name of unit which the script is being initialized for - MUST BE ENCLOSED IN QUOTES!
height = the height at which the unit (if AI) will pull the chute
variance = the variation on the height at which the ai will pull the chute
failrate = the chance of the parachute failing (higher number = less chance of failure)
EXAMPLE: ["soldier1",150,20,1000] exec "real_halo.xsqs"
EXPLANATION OF EXAMPLE: The above would make the soldier named "soldier1" pull his chute at alititudes between 130-170 meters.
EXPLANATION OF FAILRATE: The failurerate is calculated by generating two random numbers using the failrate, and chopping the
decimals off. If the two random numbers are the same, the chute fails. If the number 2 was selected as the fail rate, the chute
chute would fail frequently, as the two random numbers would have a 1/2 chance of being the same. If the failure rate is set to
5000 two random numbers from 1-5000 would have to come up the same - consequently the chute wouldn't fail very often.
FEATURES:
* Works with AI and humans
* No triggers needed
* Everything done with one script (including the action)
* Ability to specify - Height at which the AI pulls the chute, variation on height, Failure rate of parachute.
* Detects if unit is AI or human - if human, and action for pulling the chute appears
* Automatically detects ejections and activates (HALO feature only activates if the unit is more than 100 meters above ground!)
* Unit continues to descend rapidly after pulling the chute, descent speed slows gradually after chute deploys..In other words, it's realistic
* Works in multiplayer
* Works on for all sides
* Works after unit (or player) dies and respawns
* Will still work if a player controlled unit disconnects and unit becomes AI
if you can explain this to me it would be great...
-
It seems to me that the above is fairly self explanatory.
Which bits of it do you not understand?
Planck
-
i tryed my best i put in all the stuff do i have to add it to a mission file im kinda new at this.
-
Like Macca said, read SnYpirs introduction to code snippets and Johan Gustavssons Script Tutotrial.
:beat: *Gets Shot* :beat:
-
thats all giberish to mean i get lost on the first sentence :-[ :-[ :-[
-
Have you read a beginner tute? Like Abuus or something. Thought macca said that one was good ::) ;D
:beat: *Gets Shot* :beat:
-
ill read it over but i would love it if you could explain this script to me ...
-
Anything I can say to you is either in em 3 tutes I recommended or in the script explanation. I can't explain it any better.
:beat: *Gets Shot* :beat:
-
If you haven't read the tutes you won't understand the answer anyway.
Learning to talk about OFP is a little like learning a language (though much much easier). You have to put some work in if you want understand what's going on.
-
thanks for trying to help
-
We DID help you, it's just that we cannot help if you cannot understand the tutes. Both the beginner tutorial and SnYpirs introduction are very easy to understand so we can not explain it any further.
:beat: *Gets Shot* :beat: