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 Technical / Map Design »Incorrect script structure?

Author Topic: Incorrect script structure? (8 messages, Page 1 of 1)
Moderators: Dennis

Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 25, 2013 06:59 AM    Msg. 1 of 8       
This script is designed to do the following:
set the variable "player0_choosing" to 0
sleep until the health amount changes from being dead and then
add loadout1 s equipment over the top of whats there.

What it ACTUALLY does for some reason is:
set the variable "player0_choosing" to 0 ( as far as I know works)
does nothing unless you select it after you have already respawned, and even then only sometimes will it do it.
places equipment over the default ar and pistol I started with, except it keeps the default ar as a 3rd weapon for some reason.

WHAT DID I DO WRONG?? It's stumped me as to why it is doing this...

(script dormant player0_l1
(set "player0_choosing" false)
(sleep_until (!= (unit_get_health (unit (list_get (players) 0))) -1) 5)
(player_add_equipment (unit (list_get (players) 0)) loadout1 true)
)

Can somebody help me as to:
How to make the default ar go away
How to make it work EVERY time
and What to do so that it actually waits before doing it, so that you don't have to choose your loadout after you spawn


Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 25, 2013 12:30 PM    Msg. 2 of 8       
Quote: --- Original message by: DSalimander
Quote: --- Original message by: Stevedoggen
This script is designed to do the following:
set the variable "player0_choosing" to 0
sleep until the health amount changes from being dead and then
add loadout1 s equipment over the top of whats there.

But what does that even mean, though?


It tracks the life amount of the person, player0 in this case.
It is set to notice a change in the health amount, from -1 (being dead) to 1 (being alive)
essentially, it is supposed to accept the command (pressing a button, which wakes this script), and wait until the player respawns, then change the loadout. Instead, it doesn't do anything.
Edited by Stevedoggen on Apr 25, 2013 at 12:31 PM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 25, 2013 01:33 PM    Msg. 3 of 8       
take the global name out of quotes, your treating it as a string when its not a string, its a global. And is that global previously defined? Next time, post the actual error information sapien gives you when compiling.


Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 26, 2013 12:46 AM    Msg. 4 of 8       
Quote: --- Original message by: kirby_422
take the global name out of quotes, your treating it as a string when its not a string, its a global.

Noted

Quote: --- Original message by: kirby_422
And is that global previously defined?

Yes, it is.

Quote: --- Original message by: kirby_422
Next time, post the actual error information sapien gives you when compiling.


Umm, you see, there isn't any errors. OS debug doesn't say anything out of the ordinary and it goes through fine (all scripts compile correctly), the issue I have is with the ingame performance of them.

first two globals and the suicide and negative_points scripts were experiments - not important to issue. this is overly stretched out and unoptimised, but that is intentional. each of the player0_l1 type scripts are all the possible combinations of players choosing a loadout.
Have fun.

(global long suicide_count 0)
(global short points_score 0)
(global long death_status 0)
(global boolean player0_choosing false)
(global boolean player1_choosing false)
(global boolean player2_choosing false)
(global boolean player3_choosing false)
(global boolean player4_choosing false)
(global boolean player5_choosing false)
(global boolean player6_choosing false)
(global boolean player7_choosing false)
(global boolean player8_choosing false)
(global boolean player9_choosing false)
(global boolean player10_choosing false)
(global boolean player11_choosing false)
(global boolean player12_choosing false)
(global boolean player13_choosing false)
(global boolean player14_choosing false)
(global boolean player15_choosing false)
(global short local_number -1)

(script continuous local_player_check
(if (and (= "local_number" 0) true) (set "player0_choosing" true))
(if (and (= "local_number" 1) true) (set "player1_choosing" true))
(if (and (= "local_number" 2) true) (set "player2_choosing" true))
(if (and (= "local_number" 3) true) (set "player3_choosing" true))
(if (and (= "local_number" 4) true) (set "player4_choosing" true))
(if (and (= "local_number" 5) true) (set "player5_choosing" true))
(if (and (= "local_number" 6) true) (set "player6_choosing" true))
(if (and (= "local_number" 7) true) (set "player7_choosing" true))
(if (and (= "local_number" 8) true) (set "player8_choosing" true))
(if (and (= "local_number" 9) true) (set "player9_choosing" true))
(if (and (= "local_number" 10) true) (set "player10_choosing" true))
(if (and (= "local_number" 11) true) (set "player11_choosing" true))
(if (and (= "local_number" 12) true) (set "player12_choosing" true))
(if (and (= "local_number" 13) true) (set "player13_choosing" true))
(if (and (= "local_number" 14) true) (set "player14_choosing" true))
(if (and (= "local_number" 15) true) (set "player15_choosing" true))
(set "local_number" -1)
)
(script continuous suicide_declare
(sleep_until (!= (player_data_get_integer 0 "suicides") suicide_count) 10)
(set suicide_count (player_data_get_integer 0 "suicides"))
(sound_impulse_start "h4_sounds\suicide" none 1)
(set "points_score" (- "points_score" 10))
)
(script continuous score_negative
(sleep_until ( > 0 "points_score"))
(sound_impulse_start "h4_sounds\intro_infin_slay" none 1)
(set "points_score" 0)
)
(script continuous loadouts
(sleep_until (!= (player_data_get_integer 0 "deaths") death_status) 10)
(set death_status (player_data_get_integer 0 "deaths"))
(display_scripted_ui_widget loadout_system)
)
(script dormant player0_l1
(set "player0_choosing" false)
(sleep_until (!= (unit_get_health (unit (list_get (players) 0))) -1) 5)
(player_add_equipment (unit (list_get (players) 0)) loadout1 true)
)
(script dormant player0_l2
(set "player0_choosing" false)
(sleep_until (!= (unit_get_health (unit (list_get (players) 0))) -1) 5)
(player_add_equipment (unit (list_get (players) 0)) loadout2 true)
)
(script dormant player0_l3
(set "player0_choosing" false)
(sleep_until (!= (unit_get_health (unit (list_get (players) 0)))-1) 5)
(player_add_equipment (unit (list_get (players) 0)) loadout3 true)
)
(script dormant player0_l4
(set "player0_choosing" false)
(sleep_until (!= (unit_get_health (unit (list_get (players) 0))) -1) 5)
(player_add_equipment (unit (list_get (players) 0)) loadout4 true)
)
(script dormant player1_l1
(set "player1_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 1))) 1))
(player_add_equipment (unit (list_get (players) 1)) loadout1 true)
)
(script dormant player1_l2
(set "player1_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 1))) 1))
(player_add_equipment (unit (list_get (players) 1)) loadout2 true)
)
(script dormant player1_l3
(set "player1_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 1))) 1))
(player_add_equipment (unit (list_get (players) 1)) loadout3 true)
)
(script dormant player1_l4
(set "player1_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 1))) 1))
(player_add_equipment (unit (list_get (players) 1)) loadout4 true)
)
(script dormant player2_l1
(set "player2_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 2))) 1))
(player_add_equipment (unit (list_get (players) 2)) loadout1 true)
)
(script dormant player2_l2
(set "player2_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 2))) 1))
(player_add_equipment (unit (list_get (players) 2)) loadout2 true)
)
(script dormant player2_l3
(set "player2_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 2))) 1))
(player_add_equipment (unit (list_get (players) 2)) loadout3 true)
)
(script dormant player2_l4
(set "player2_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 2))) 1))
(player_add_equipment (unit (list_get (players) 2)) loadout4 true)
)
(script dormant player3_l1
(set "player3_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 3))) 1))
(player_add_equipment (unit (list_get (players) 3)) loadout1 true)
)
(script dormant player3_l2
(set "player3_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 3))) 1))
(player_add_equipment (unit (list_get (players) 3)) loadout2 true)
)
(script dormant player3_l3
(set "player3_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 3))) 1))
(player_add_equipment (unit (list_get (players) 3)) loadout3 true)
)
(script dormant player3_l4
(set "player3_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 3))) 1))
(player_add_equipment (unit (list_get (players) 3)) loadout4 true)
)
(script dormant player4_l1
(set "player4_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 4))) 1))
(player_add_equipment (unit (list_get (players) 4)) loadout1 true)
)
(script dormant player4_l2
(set "player4_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 4))) 1))
(player_add_equipment (unit (list_get (players) 4)) loadout2 true)
)
(script dormant player4_l3
(set "player4_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 4))) 1))
(player_add_equipment (unit (list_get (players) 4)) loadout3 true)
)
(script dormant player4_l4
(set "player4_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 4))) 1))
(player_add_equipment (unit (list_get (players) 4)) loadout4 true)
)
(script dormant player5_l1
(set "player5_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 5))) 1))
(player_add_equipment (unit (list_get (players) 5)) loadout1 true)
)
(script dormant player5_l2
(set "player5_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 5))) 1))
(player_add_equipment (unit (list_get (players) 5)) loadout2 true)
)
(script dormant player5_l3
(set "player5_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 5))) 1))
(player_add_equipment (unit (list_get (players) 5)) loadout3 true)
)
(script dormant player5_l4
(set "player5_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 5))) 1))
(player_add_equipment (unit (list_get (players) 5)) loadout1 true)
)
(script dormant player6_l1
(set "player6_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 6))) 1))
(player_add_equipment (unit (list_get (players) 6)) loadout1 true)
)
(script dormant player6_l2
(set "player6_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 6))) 1))
(player_add_equipment (unit (list_get (players) 6)) loadout2 true)
)
(script dormant player6_l3
(set "player6_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 6))) 1))
(player_add_equipment (unit (list_get (players) 6)) loadout3 true)
)
(script dormant player6_l4
(set "player6_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 6))) 1))
(player_add_equipment (unit (list_get (players) 6)) loadout4 true)
)
(script dormant player7_l1
(set "player7_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 7))) 1))
(player_add_equipment (unit (list_get (players) 7)) loadout1 true)
)
(script dormant player7_l2
(set "player7_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 7))) 1))
(player_add_equipment (unit (list_get (players) 7)) loadout2 true)
)
(script dormant player7_l3
(set "player7_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 7))) 1))
(player_add_equipment (unit (list_get (players) 7)) loadout3 true)
)
(script dormant player7_l4
(set "player7_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 7))) 1))
(player_add_equipment (unit (list_get (players) 7)) loadout4 true)
)
(script dormant player8_l1
(set "player8_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 8))) 1))
(player_add_equipment (unit (list_get (players) 8)) loadout1 true)
)
(script dormant player8_l2
(set "player8_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 8))) 1))
(player_add_equipment (unit (list_get (players) 8)) loadout2 true)
)
(script dormant player8_l3
(set "player8_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 8))) 1))
(player_add_equipment (unit (list_get (players) 8)) loadout3 true)
)
(script dormant player8_l4
(set "player8_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 8))) 1))
(player_add_equipment (unit (list_get (players) 8)) loadout4 true)
)
(script dormant player9_l1
(set "player9_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 9))) 1))
(player_add_equipment (unit (list_get (players) 9)) loadout1 true)
)
(script dormant player9_l2
(set "player9_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 9))) 1))
(player_add_equipment (unit (list_get (players) 9)) loadout2 true)
)
(script dormant player9_l3
(set "player9_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 9))) 1))
(player_add_equipment (unit (list_get (players) 9)) loadout3 true)
)
(script dormant player9_l4
(set "player9_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 9))) 1))
(player_add_equipment (unit (list_get (players) 9)) loadout4 true)
)
(script dormant player10_l1
(set "player10_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 10))) 1))
(player_add_equipment (unit (list_get (players) 10)) loadout1 true)
)
(script dormant player10_l2
(set "player10_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 10))) 1))
(player_add_equipment (unit (list_get (players) 10)) loadout2 true)
)
(script dormant player10_l3
(set "player10_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 10))) 1))
(player_add_equipment (unit (list_get (players) 10)) loadout3 true)
)
(script dormant player10_l4
(set "player10_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 10))) 1))
(player_add_equipment (unit (list_get (players) 10)) loadout4 true)
)
(script dormant player11_l1
(set "player11_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 11))) 1))
(player_add_equipment (unit (list_get (players) 11)) loadout1 true)
)
(script dormant player11_l2
(set "player11_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 11))) 1))
(player_add_equipment (unit (list_get (players) 11)) loadout2 true)
)
(script dormant player11_l3
(set "player11_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 11))) 1))
(player_add_equipment (unit (list_get (players) 11)) loadout3 true)
)
(script dormant player11_l4
(set "player11_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 11))) 1))
(player_add_equipment (unit (list_get (players) 11)) loadout4 true)
)
(script dormant player12_l1
(set "player12_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 12))) 1))
(player_add_equipment (unit (list_get (players) 12)) loadout1 true)
)
(script dormant player12_l2
(set "player12_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 12))) 1))
(player_add_equipment (unit (list_get (players) 12)) loadout2 true)
)
(script dormant player12_l3
(set "player12_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 12))) 1))
(player_add_equipment (unit (list_get (players) 12)) loadout3 true)
)
(script dormant player12_l4
(set "player12_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 12))) 1))
(player_add_equipment (unit (list_get (players) 12)) loadout4 true)
)
(script dormant player13_l1
(set "player13_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 13))) 1))
(player_add_equipment (unit (list_get (players) 13)) loadout1 true)
)
(script dormant player13_l2
(set "player13_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 13))) 1))
(player_add_equipment (unit (list_get (players) 13)) loadout2 true)
)
(script dormant player13_l3
(set "player13_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 13))) 1))
(player_add_equipment (unit (list_get (players) 13)) loadout3 true)
)
(script dormant player13_l4
(set "player13_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 13))) 1))
(player_add_equipment (unit (list_get (players) 13)) loadout4 true)
)
(script dormant player14_l1
(set "player14_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 14))) 1))
(player_add_equipment (unit (list_get (players) 14)) loadout1 true)
)
(script dormant player14_l2
(set "player14_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 14))) 1))
(player_add_equipment (unit (list_get (players) 14)) loadout2 true)
)
(script dormant player14_l3
(set "player14_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 14))) 1))
(player_add_equipment (unit (list_get (players) 14)) loadout3 true)
)
(script dormant player14_l4
(set "player14_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 14))) 1))
(player_add_equipment (unit (list_get (players) 14)) loadout4 true)
)
(script dormant player15_l1
(set "player15_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 15))) 1))
(player_add_equipment (unit (list_get (players) 15)) loadout1 true)
)
(script dormant player15_l2
(set "player15_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 15))) 1))
(player_add_equipment (unit (list_get (players) 15)) loadout2 true)
)
(script dormant player15_l3
(set "player15_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 15))) 1))
(player_add_equipment (unit (list_get (players) 15)) loadout3 true)
)
(script dormant player15_l4
(set "player15_choosing" false)
(sleep_until (= (unit_get_health (unit (list_get (players) 15))) 1))
(player_add_equipment (unit (list_get (players) 15)) loadout4 true)
)
(script dormant loadout1
(set "local_number" (player_local_get))
(cond
((= player0_choosing true) (wake player0_l1))
((= player1_choosing true) (wake player1_l1))
((= player2_choosing true) (wake player2_l1))
((= player3_choosing true) (wake player3_l1))
((= player4_choosing true) (wake player4_l1))
((= player5_choosing true) (wake player5_l1))
((= player6_choosing true) (wake player6_l1))
((= player7_choosing true) (wake player7_l1))
((= player8_choosing true) (wake player8_l1))
((= player9_choosing true) (wake player9_l1))
((= player10_choosing true) (wake player10_l1))
((= player11_choosing true) (wake player11_l1))
((= player12_choosing true) (wake player12_l1))
((= player13_choosing true) (wake player13_l1))
((= player14_choosing true) (wake player14_l1))
((= player15_choosing true) (wake player15_l1))
)
)
(script dormant loadout2
(set "local_number" (player_local_get))
(cond
((= player0_choosing true) (wake player0_l2))
((= player1_choosing true) (wake player1_l2))
((= player2_choosing true) (wake player2_l2))
((= player3_choosing true) (wake player3_l2))
((= player4_choosing true) (wake player4_l2))
((= player5_choosing true) (wake player5_l2))
((= player6_choosing true) (wake player6_l2))
((= player7_choosing true) (wake player7_l2))
((= player8_choosing true) (wake player8_l2))
((= player9_choosing true) (wake player9_l2))
((= player10_choosing true) (wake player10_l2))
((= player11_choosing true) (wake player11_l2))
((= player12_choosing true) (wake player12_l2))
((= player13_choosing true) (wake player13_l2))
((= player14_choosing true) (wake player14_l2))
((= player15_choosing true) (wake player15_l2))
)
)
(script dormant loadout3
(set "local_number" (player_local_get))
(cond
((= player0_choosing true) (wake player0_l3))
((= player1_choosing true) (wake player1_l3))
((= player2_choosing true) (wake player2_l3))
((= player3_choosing true) (wake player3_l3))
((= player4_choosing true) (wake player4_l3))
((= player5_choosing true) (wake player5_l3))
((= player6_choosing true) (wake player6_l3))
((= player7_choosing true) (wake player7_l3))
((= player8_choosing true) (wake player8_l3))
((= player9_choosing true) (wake player9_l3))
((= player10_choosing true) (wake player10_l3))
((= player11_choosing true) (wake player11_l3))
((= player12_choosing true) (wake player12_l3))
((= player13_choosing true) (wake player13_l3))
((= player14_choosing true) (wake player14_l3))
((= player15_choosing true) (wake player15_l3))
)
)
(script dormant loadout4
(set "local_number" (player_local_get))
(cond
((= player0_choosing true) (wake player0_l4))
((= player1_choosing true) (wake player1_l4))
((= player2_choosing true) (wake player2_l4))
((= player3_choosing true) (wake player3_l4))
((= player4_choosing true) (wake player4_l4))
((= player5_choosing true) (wake player5_l4))
((= player6_choosing true) (wake player6_l4))
((= player7_choosing true) (wake player7_l4))
((= player8_choosing true) (wake player8_l4))
((= player9_choosing true) (wake player9_l4))
((= player10_choosing true) (wake player10_l4))
((= player11_choosing true) (wake player11_l4))
((= player12_choosing true) (wake player12_l4))
((= player13_choosing true) (wake player13_l4))
((= player14_choosing true) (wake player14_l4))
((= player15_choosing true) (wake player15_l4))
)
)

Edited by Stevedoggen on Apr 26, 2013 at 01:04 AM


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Apr 26, 2013 08:11 AM    Msg. 5 of 8       
To my knowledge of scripting, there has to be the globals at the top, statics under that, then dormant, then whatever else.

Because you can reference UP scripts, but not down. And then again... You haven't referenced ANY of the dormant scripts, so how can they be executed, if mr. BLAM doesn't know when?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 26, 2013 02:07 PM    Msg. 6 of 8       
Anyways, not only are you wasting tons of space, and have an incredibly low success rate, but you also can only pick each weapon once.

Why is it always setting this local number variable to -1?... Since its a continuous, its always gonna do that. So, say its half way through checking what the number is, up around 10. Someone tries to set the number for it to check as something like 3.. Well, now its past that point, so it reassigns it to -1. That data is now lost, and you have a horrible success rate. 16th player in the server has the highest success rate, but that still doesn't even guarantee it. It could assign the 15 right after it checks for the 15, and before it reassigns to -1.

Directly using the wake commands on dormant scripts.. Dormant scripts, if correctly executed, only run once. They can only be ran infinitely when ran via widgets, so that means the moment you wake a dormant once, its gone. So, after 4 respawns, you can no longer use weapons.

And most importantly, why are you talking a script that should be around 30 or so lines, and making it that many lines?..

And you still dont have anything to broadcast the results between all the PCs, as well as the fact your still using widgets so the clients will never inform the host of their choices. So, its still SP, just a lot of unneeded players listed.

PS, player_local_get doesn't correspond with the players number in the object list, which is why I didn't use it like that in one of your other 5 threads when I showed you what to write.

Notice you complain about default weapons at the top. Just remove the weapons from the biped tag, since its falling back to those. Replacing equipment doesnt actually work on the readied weapon (In fact, even if you physically destroy the weapon, the biped still is using the animations for that weapon until you switch to another one. Regardless about how you go about it, the game doesnt really like changing out weapons unnaturally.)


Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 27, 2013 12:21 AM    Msg. 7 of 8       
Quote: --- Original message by: hobbet360
You haven't referenced ANY of the dormant scripts, so how can they be executed, if mr. BLAM doesn't know when?


they activate through the ui_widgets. they pop up when you die, that's how.

Quote: --- Original message by: kirby_422
Why is it always setting this local number variable to -1

I had something else in mind, I didn't mean to have it set up that way. Whoops indeed.

Quote: --- Original message by: kirby_422
They can only be ran infinitely when ran via widgets, so that means the moment you wake a dormant once, its gone.

So by being indirect, it breaks itself. Got it.

Quote: --- Original message by: kirby_422
And most importantly, why are you talking a script that should be around 30 or so lines, and making it that many lines?...


Quote: --- Original message by: Stevedoggenthis is overly stretched out and unoptimised, but that is intentional.

I had it set so that when I muck up (like thus), I can actually read what I have done and fix it. Ill make it smaller when I'm done.

Quote: --- Original message by: kirby_422
And you still dont have anything to broadcast the results between all the PCs, as well as the fact your still using widgets so the clients will never inform the host of their choices.

One step at a time. I'll figure it out later. And by I'll, I mean I'll try, probs give up and bug you with trivial questions.

Quote: --- Original message by: kirby_422
player_local_get doesn't correspond with the players number in the object list


player_local_get
returns the local player's player-list-index

(if (and (= "local_number" 0) true) (set "player0_choosing" true))

It recognises that the players player-index-number is 0, thus player 0
If this is not correct, then please, pray tell what exactly the point of this command is, what it actually is outputting and how it can be used. I'd wanna know =)


Quote: --- Original message by: kirby_422
...which is why I didn't use it like that in one of your other 5 threads when I showed you what to write.

Well, you never actually said it there. Not even hinted it, really. But now I know.
Also 3, not 5. And I have non-loadout related questions on your scripting thread btw. Just a heads up. =)

Quote: --- Original message by: kirby_422
Just remove the weapons from the biped tag

Thank you.

PS I hope I don't come off as ungrateful for your help, I truly am thankful, just stubborn to make this mother work, one way or another.
Edited by Stevedoggen on Apr 27, 2013 at 12:24 AM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 27, 2013 12:36 AM    Msg. 8 of 8       
Quote: --- Original message by: Stevedoggen
Quote: --- Original message by: kirby_422
player_local_get doesn't correspond with the players number in the object list


player_local_get
returns the local player's player-list-index

(if (and (= "local_number" 0) true) (set "player0_choosing" true))

It recognises that the players player-index-number is 0, thus player 0
If this is not correct, then please, pray tell what exactly the point of this command is, what it actually is outputting and how it can be used. I'd wanna know =)

player-list-index != object_list index.
In fact, the orders would be exact opposite.
Lets say we had a server with bob, joe, marry, and sue. They joined in that order.
Player list Index:
0 - Bob
1 - Joe
2 - Marry
3 - Sue
Object_list Index (Assuming they're all alive):
0 - Sue
1 - Marry
2 - Joe
3 - Bob

The object list will only list the living, and the newest object is the lowest number. Player list, it will start numbering players from 0 upwards. The player indexes are only used for OS' new commands relating to players. Any of those commands that asks for a player index, it wants that ordering. Now, if you want the actual character, they took care of that too. (player_data_get_object <player-index> slave_unit) will return the character as an object. Just toss (unit <object>) around it to cast it to a unit, and your good to go.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 3:43 AM 297 ms.
A Halo Maps Website