A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »I need a script, please

Author Topic: I need a script, please (10 messages, Page 1 of 1)
Moderators: Dennis

grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Oct 17, 2011 12:00 AM    Msg. 1 of 10       
So i need a script that when the player enters a trigger volume named gravlift it attaches an effect located in "tags\characters\cyborg_mp\armor_abilities\gravlift" to the flashlight marker on the biped. it is for multiplayer and i think that's all i need. i just can't think of where to begin with this script, i've only ever made VERY BASIC scripts. thanks in advance


GE


olly12345
Joined: Jul 30, 2008


Posted: Oct 18, 2011 05:36 AM    Msg. 2 of 10       
Won't that activate it on every player at once?


SlappyThePirate
Joined: Aug 24, 2009

You are irritating, I'll release nothing


Posted: Oct 19, 2011 02:42 PM    Msg. 3 of 10       
Do you know what a player increment is?


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Oct 24, 2011 11:41 PM    Msg. 4 of 10       
Hmm :/ i tested this script and it's like it's always on, not just when i'm in the trigger volume. Any ideas?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Oct 25, 2011 12:10 AM    Msg. 5 of 10       
Quote: --- Original message by: grunt_eater
Hmm :/ i tested this script and it's like it's always on, not just when i'm in the trigger volume. Any ideas?

Im more amazed that you had it compile lol, what changes did you make to it, because it wont compile as is. lets go over the single player variant:

Quote: --- Original message by: Private Caboose
 (sleep_until (volume_test_object gravlift (unit (list_get (players) 0)) True)
(effect_new_on_object_marker "\tags\characters\cyborg_mp\armor_abilities\gravlift" (unit (list_get (players) 0)) "flashlight"
)

lets count the ( and the ) in the first line.. there are 5 (, 4 )..... the sleep_until is unmatched....
Now, volume test.. it expects two input, a volume and a object, why is there a boolean after that?...... and after that, your meant to put how many ticks you want it to check during. And why is it expecting a tag inside "halo custom edition\tags\\tags\characters\cyborg_mp\armor_abilities\gravlift.effect" ?........

you should replace it with if's, replace 0 with a variable, and increment the variable as it loops, and if the variable exceeds the player count, set it back to 0 (you can either use 15, or (list_count (players)) to just care about players inside the server)

His second version he had with all the sleep_until's for every player in a single script, this means that you need to wait until every single player goes through the lift before the first player can use it again.. so if you dont have 16 people in the server, some people will never get to use the lift once.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Oct 25, 2011 10:18 AM    Msg. 6 of 10       
Um, okay...But then if you're saying that it won't work then can you tell me how to make one that does? Like i said i have an EXTREMELY simple knowledge of scripting, to put it lightly, i don't know where to start :/


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Oct 25, 2011 12:30 PM    Msg. 7 of 10       
Quote: --- Original message by: grunt_eater
Um, okay...But then if you're saying that it won't work then can you tell me how to make one that does? Like i said i have an EXTREMELY simple knowledge of scripting, to put it lightly, i don't know where to start :/

... did you not read where I pointed out all the issues, and gave examples of things that could be replaced to work better?..
Quote: --- Original message by: kirby_422
lets count the ( and the ) in the first line.. there are 5 (, 4 )..... the sleep_until is unmatched....
Now, volume test.. it expects two input, a volume and a object, why is there a boolean after that?...... and after that, your meant to put how many ticks you want it to check during. And why is it expecting a tag inside "halo custom edition\tags\\tags\characters\cyborg_mp\armor_abilities\gravlift.effect" ?........

you should replace it with if's, replace 0 with a variable, and increment the variable as it loops, and if the variable exceeds the player count, set it back to 0 (you can either use 15, or (list_count (players)) to just care about players inside the server)

His second version he had with all the sleep_until's for every player in a single script, this means that you need to wait until every single player goes through the lift before the first player can use it again.. so if you dont have 16 people in the server, some people will never get to use the lift once.


Anyways,
(global short number 0)

(script static "unit" player
(unit (list_get (players) number))
)

(script continuous gravLift
(if (volume_test_object <trigger_volume> (player)) (effect_new_on_object_marker <effect> (player) ""))
(if (< number (- (list_count (players)) 1) (set number (+ number 1)) (set number 0))
)

you need to fill in your trigger volume, and your effect. read what I stated about effects in my previous post for what location to add in. You can replace the "" with any marker or frame you want, but empty should work fine. If you have your trigger volume as a pillar for the entire lift, rather than just using it at the bottom with one strong effect to launch them up, then you would probably rather use 15 in the place of (- (list_count (players)) 1), because I've made it only care about players in the server, which will make it take different times to loop around all the players when there is different numbers of players in the server. if its a slow constant force, that will be strange changing with the number of players.

If you have multiple lifts, just duplicate the '(if (volume_test' line for as many you need (dont duplicate the if number line, it will ruin the counting system if you do that).

Probably should of read your post to see weather you had info on what exactly you wanted rather than just writing a valid better version of that previous script, but whatever lol.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Nov 6, 2011 12:03 AM    Msg. 8 of 10       
Okay so here's what i've got

(global short number 0)

(script static "unit" player
(unit (list_get (players) number))
)

(script continuous gravLift
(if (volume_test_object gravlift (player)) (effect_new_on_object_marker characters\cyborg_mp\armor_abilitys\grav_lift (player) flashlight))
(if (< number (- (list_count (players)) 1) (set number (+ number 1)) (set number 0))
))


i filled in the blanks and it said the left parenthesis at the top was unmatched, so i added that too. the error i have now is this

[gravlift line 11] i expected (if <condition> <then> [<else>]).: (if (< number (- (list_count (players)) 1) (set number (+ number 1)) (set number 0))

11.05.11 23:01:08 recompiling scripts after scenarios were merged.
11.05.11 23:01:08 this left parenthesis is unmatched.: (if (< number (- (list_count (players)) 1) (set number (+ number 1)) (set number 0))


How do i fix this and what did i do wrong?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Nov 6, 2011 12:15 AM    Msg. 9 of 10       
Quote: --- Original message by: grunt_eater
(global short number 0)

(script static "unit" player
(unit (list_get (players) number))
)

(script continuous gravLift
(if (volume_test_object gravlift (player)) (effect_new_on_object_marker characters\cyborg_mp\armor_abilitys\grav_lift (player) flashlight))
(if (< number (- (list_count (players)) 1)) (set number (+ number 1)) (set number 0))
)

How do i fix this and what did i do wrong?

I missed out a ) earlier after the '1)' part. I added it into the quoted code ^^


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Nov 6, 2011 12:21 AM    Msg. 10 of 10       
KK. Thinks kirby :D

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 6:57 PM 156 ms.
A Halo Maps Website