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 »Scripting Thread

Page 6 of 7 Go to page: · 1 · 2 · 3 · 4 · 5 · [6] · 7 · Prev · Next
Author Topic: Scripting Thread (231 messages, Page 6 of 7)
Moderators: Dennis

Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 21, 2013 06:10 AM    Msg. 176 of 231       
I also have a question
I entered in a script from page two about betrayal declaring, and it makes sense, but when I entered it into a script and compiled it,(with my own slight modding of course) it keeps saying the parentheses aren't equal when I am sure they are. (specifically the line 2 declaring the script) Nevermind, I read that parentheses issues are due to another error. The error, according to OS debug is [announcer line 3] i expected a value of type long, but the variable red_betrayal_count has type short: red_betrayal_count) 10)
Help?

Original from page two:
(global short red_betrayal_count 0)
(script continuous red_betrayal
(sleep_until (!= (player_team_data_get_integer 0 "friendly_fire_kills") red_betrayal_count) 10)
(set red_betrayal_count (player_team_data_get_integer 0 "friendly_fire_kills"))
(sound_impulse_start "sounds\imadethisdirectoryup\betrayal" none 1)
)

My entered version:
(global short suicide_count 0)
(script continuous suicide
(sleep_until (!= (player_data_get_integer 0 "suicides") suicide_count) 10)
(set suicide_count (player_data_get_integer 0 "suicides"))
(sound_impulse_start "sounds\sfx\impulse\ting\ting" none 1)
)
Edited by Stevedoggen on Apr 21, 2013 at 06:18 AM
Edited by Stevedoggen on Apr 21, 2013 at 07:17 AM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 21, 2013 04:31 PM    Msg. 177 of 231       
The game usually handles conversions quite well in the background... Anyways, easiest solution is to simply change the global to a long like it suggests. Otherwise, you can try to get it to kick in its auto-conversions by adding the numbers in question to 0 (since that normally does the conversions perfectly)


Stevedoggen
Joined: Jan 14, 2013

#Byf4Lyf


Posted: Apr 24, 2013 04:27 AM    Msg. 178 of 231       
I saw previously that there was a script that turned off/on elements of the HUD individually.

( hud_show_crosshair 0 )
( hud_show_motion_sensor 0 )
( hud_show_health 0 )

How would one hook it up to other non-standard parts of the HUD, like screen cracks when near death?

PS I realise that it is generally used in place of the health part of the HUD, but can't one have it set as a different part entirely of the HUD, and have it set through scripting to show or not?

Also another question, is there a limit to the number of lines or scripts that can be in one map?
I have about 70 scripts (60 or so dormant) in one hsc file, and its well past 300 lines. does it matter?
Edited by Stevedoggen on Apr 25, 2013 at 05:26 AM


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: May 7, 2013 01:54 AM    Msg. 179 of 231       
Question about scripting in OS. What would happen if you compiled scripts made with OS commands in OS sapien, then used normal tool to compile the map?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 7, 2013 02:24 AM    Msg. 180 of 231       
It would rage about not knowing what the script commands are (Basically, what happens if you place an invalid command in a hsc when compiling in sapien; you get that error) as well as script syntax to large, etc.


bourrin33
Joined: Oct 19, 2009

HEK not installed tho


Posted: May 9, 2013 04:15 PM    Msg. 181 of 231       
Hey, I need help about syncing devices like in yoyorast :

We have a lift with 2 states, up and down, with a button, how do we make it sync/start at the same time for everyone ?


altis94
Joined: Oct 5, 2012

Join my Discord https://discord.gg/GDVEaRD


Posted: May 9, 2013 04:53 PM    Msg. 182 of 231       
With 2 buttons. 1 on top and 1 on the bottom.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 9, 2013 05:34 PM    Msg. 183 of 231       
You use bipeds that you kill, to send the sync information to the clients. Just setup a PVS camera in a sync room, and toss a vehicle over the biped. When the client checks that bipeds health, preform that action. With that alone, if people join while the lift is in the middle, it wont sync. If you want to make a swarm of bipeds however, you can sync all the individual locations (although really, in most situations it would be overkill)

Heres a basic example
(global boolean host false) ;;SET THIS ELSEWERE, PLENTY OF VARIOUS WAYS TO DO SO.
(script continuous lift_down
(sleep_until (!= (unit_get_health down_biped) 1) 1)
(device_set_position lift 0)
(sleep 5)
(object_create_anew down_biped)
)
(script continuous lift_up
(sleep_until (!= (unit_get_health up_biped) 1) 1)
(device_set_position lift 1)
(sleep 5)
(object_create_anew up_biped)
)
(script continuous host_only
(object_pvs_set_camera sync_room_cam)
(if host
(if (= (device_group_get switches) 1)
(object_teleport crusher_vehicle down_flag)
(object_teleport crusher_vehicle up_flag)
)
(sleep 150)
)
)

Pick your favorite method of deciding whose the host; pick a vehicle that spawns via globals and check it exists, use OS to ask if they're the host, etc. Whatever method you like. I didnt include any set method in the example. Easiest non-OS one is (set host (!= (unit_get_health host_check) -1)) with a vehicle from globals.globals.

Anyways, your two switches are part of a device group called switches, this way, they toggle together, etc. When the group is on, its upwards, when its off, its down. That way, you can call the lift when your on the other side, etc. Although, I guess I did leave one issue in there.. Right now, you can switch the direction mid-transition; this is pretty bad for syncing. If you want, I can post a version that syncs the exact location so switching direction is acceptable, or a version that prevents them from doing this. So, talk moar about what you want, etc.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: May 22, 2013 11:04 AM    Msg. 184 of 231       
So after some research i think I've found out that the way halo's player list works. When a player joins it bumps everyone up a number. So basically player 0 becomes player 1, player 1 becomes player 2 and so on, and the new player becomes player 0. This makes tracking players kind of difficult, but i had a thought on making it work. What if we assigned each player to a global, and then said when a new player joins it sets each global to the one behind it. So player 1 would be set to player 0, player 2 would be set to player 1, ect ect. The only problem i'm having with this is that i can't figure out how to detect if player list has increased by one. See?
(script continuous count-em-up
(if (list_count (players)) (+ 1)) ;;here's where i'm having trouble :/
(set "p0" "p1")
(set "p1" "p2")
(set "p2" "p3")
(set "p3" "p4")
(set "p4" "p5") ;;snip.
)


So i was hoping an experienced scripter could help me out.

Also, i had another question. If a server can only hold 16 player, then why do we script 0 through 16? i mean, technically that would be 17 players, because 1 to 16 is 16 players, but we're adding a 17th with player 0... Lol.


afD2345
Joined: Apr 2, 2011


Posted: May 22, 2013 11:26 AM    Msg. 185 of 231       
Quote: --- Original message by: grunt_eater

(script continuous count-em-up
(if (list_count (players)) (+ 1)) ;;here's where i'm having trouble :/
(set "p0" "p1")
(set "p1" "p2")
(set "p2" "p3")
(set "p3" "p4")
(set "p4" "p5") ;;snip.
)


So i was hoping an experienced scripter could help me out.

Also, i had another question. If a server can only hold 16 player, then why do we script 0 through 16? i mean, technically that would be 17 players, because 1 to 16 is 16 players, but we're adding a 17th with player 0... Lol.


computers 'start counting' from 0.

i am not the best or experienced scripter (or even close) but couldn't you store the original amount of players in one variable and then compare the current amount of players to the original amount, and then, when new player joins, update the variable that holds the orignal amount of players?

Edited by afD2345 on May 22, 2013 at 11:29 AM


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: May 22, 2013 12:04 PM    Msg. 186 of 231       
The (list_count (players)) command is what does that. But instead of saving it, checking it constantly, and comparing it to itself to detect a change. Wouldn't it just be easier to constantly check if it had increased by one? That's what i was trying to do. Telling the script to check if the player list had increased by one, and if so then executing the commands. The problem i'm having is i don't know the proper way to use that commandage and that script won't compile.


afD2345
Joined: Apr 2, 2011


Posted: May 22, 2013 12:32 PM    Msg. 187 of 231       
Quote: --- Original message by: grunt_eater
The (list_count (players)) command is what does that. But instead of saving it, checking it constantly, and comparing it to itself to detect a change. Wouldn't it just be easier to constantly check if it had increased by one? That's what i was trying to do. Telling the script to check if the player list had increased by one, and if so then executing the commands. The problem i'm having is i don't know the proper way to use that commandage and that script won't compile.


I was thinking something like this:
...
(if ( > (list_count (players)) (originalAmount) ) ) ;; i am too lazy to check for errors; errors are possible (even likely)
...

i can't think of any other way to do that.


(if (list_count (players)) (+ 1)) ;;here's where i'm having trouble :/

if i understand that script correctly, you are saying "if the current players plus one".

i am sorry if that didn't help
Edited by afD2345 on May 22, 2013 at 12:42 PM


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: May 22, 2013 05:28 PM    Msg. 188 of 231       
Basically, what i'm trying to do there is use the list could command to count the amount of players, then detect when it is increased by one. But it won't compile, and i can't figure out how to fix it :/


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 22, 2013 05:36 PM    Msg. 189 of 231       
Quote: --- Original message by: grunt_eater
So after some research i think I've found out that the way halo's player list works. When a player joins it bumps everyone up a number.

I've already explained that in the forums multiple times... You should of asked *shrug* Anyways, object_lists cannot have gaps, everytime someone dies or respawns, it moves. Thats actually the reason why in the AA PDF I have here, that I stored everyone in globals. I honestly dont care whether they really are p0, just have a global for p0 that holds one unique player, one for p1 that holds his unique player, etc. When they die, the hook still stays on the biped. When they respawn, if more than one is respawning at the same time, you wont know which one was really which (even if you monitor the object_list positions, because you would have to wait till everyone is alive which may be never, and someone might join or quit inbetween)


Anyways, read the AA PDF, you can see how I did the tracking in there.


Black Crypt
Joined: Jun 30, 2008

Xfire : blackcrypt


Posted: May 24, 2013 07:53 PM    Msg. 190 of 231       
Can anyone tell me why this isn't working?



kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 24, 2013 08:04 PM    Msg. 191 of 231       
you wrote an invalid commands, there is no such command as cinematic_set_name, the command you mean to write, is (cinematic_set_title <cutscene_title>). Thats why its telling you that command is invalid, because it doesnt know what it is.


casual mods
Joined: May 2, 2013

I be chillin


Posted: May 25, 2013 06:19 AM    Msg. 192 of 231       
i need some help creating a script to will only run if unit shield=0
this is what i have so far, i dont understand if commands for line 3.

(script continuous purchase_check
(unit_get_shield assault_rifle)
if unit shield=0
(object_destroy assault_rifle_wall)
(sleep 150 purchase_check)
(object_destroy assault_rifle_dispenser
(object_create_anew assault_rifle_wall)
(object_create_anew assault_rifle_dispenser)
)


Black Crypt
Joined: Jun 30, 2008

Xfire : blackcrypt


Posted: May 25, 2013 10:28 AM    Msg. 193 of 231       
Quote: --- Original message by: kirby_422
you wrote an invalid commands, there is no such command as cinematic_set_name, the command you mean to write, is (cinematic_set_title <cutscene_title>). Thats why its telling you that command is invalid, because it doesnt know what it is.


Thank You Sir.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 25, 2013 07:24 PM    Msg. 194 of 231       
Quote: --- Original message by: casual mods
i need some help creating a script to will only run if unit shield=0
this is what i have so far, i dont understand if commands for line 3.

(script continuous purchase_check
(sleep_until (= (unit_get_shield assault_rifle) 0) 5)
(object_destroy assault_rifle_wall)
(sleep 150)
;(object_destroy assault_rifle_dispenser)
(object_create_anew assault_rifle_wall)
(object_create_anew assault_rifle_dispenser)
)

The object_destroy on the dispenser isn't needed since its recreated 1/30th of a second later, and if you intend this to run its destroyed effect, it wont, only damage does that. I have it commented out right now, until you figure out what you actually are intending to do with it since its useless right now.

Anyways, your if, you had no parenthesis, and = works as (= <value> <value). But, since you only want the entire script to execute when that occurs, a sleep_until is what you want.


casual mods
Joined: May 2, 2013

I be chillin


Posted: May 25, 2013 07:46 PM    Msg. 195 of 231       
thanks man, can you add me on xfire? itd be faster than the forum.


Black Crypt
Joined: Jun 30, 2008

Xfire : blackcrypt


Posted: May 28, 2013 12:45 AM    Msg. 196 of 231       


Sapien compiles the script now, but the title still does not appear :/ anyone know why?
Edited by Black Crypt on May 30, 2013 at 10:58 AM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 28, 2013 01:16 AM    Msg. 197 of 231       
Open sapien, Mission > Game Data> Cinematic Titles. Select the title.
For the location, you'll notice t (top), l (left), b (bottom), r (right). Pump up the b and r to whatever, it wont negatively effect it being too large. If its too small, it wont display, so check if it shows up with that. Just keep tweaking it till it shows up (Yes, you can see it in sapien), and actually, looking at your picture, you have 0a (alpha) meaning full transparency. Tweak the alpha till its the transparency you want (255 for full visibility, 127 for half, etc)


Black Crypt
Joined: Jun 30, 2008

Xfire : blackcrypt


Posted: May 29, 2013 08:39 PM    Msg. 198 of 231       
Thank you again.

I have another problem that hampers completion of my map.

For the curious - pictures of map here : http://s445.photobucket.com/user/blackcryptclan/library/Clearing%20Ground?sort=3&page=1

I have a sync box which contains all the vehicles that spawn in the map. During testing some players have been teleported to the sync box for a brief period. This may occur when players attempt to enter a vehicle that is about to be respawned. I have never actually witnessed this glitch, but 2 testers have reported it, so it's not a rare occurrence. Your thoughts?

here is the script that handles the vehicle spawning:

(global boolean is_host false)
(global boolean is_dedicated false)
(global boolean is_race false)

(script startup host_detect
(if (= (list_count (players) ) 0)
(set is_dedicated true)
)
(object_pvs_set_camera host_cam)
(object_create_anew host_hog)
(sleep 30)
(if (= (volume_test_object host_vol host_hog) 1)
(begin
(set is_host true)
)
)
)

(script startup vehicle_spawn
(begin
(sleep_until
(= is_host true)
)
(if (= is_host true)
(begin
(object_create_anew veh_red_1)
(object_create_anew veh_red_2)
(object_create_anew veh_red_3)
(object_create_anew veh_red_4)
(object_create_anew veh_red_5)
(object_create_anew veh_red_6)
(object_create_anew veh_blue_1)
(object_create_anew veh_blue_2)
(object_create_anew veh_blue_3)
(object_create_anew veh_blue_4)
(object_create_anew veh_blue_5)
(object_create_anew veh_blue_6)
(object_create_anew veh_extra_1)
(object_create_anew veh_extra_2)
)
)
)
)

(script continuous vehicle_respawn
(begin
(if (= is_host true)
(begin
(if (= (volume_test_object syncbox veh_red_1) true)
(begin
(object_teleport veh_red_1 veh_redbase_1)
(object_set_facing veh_red_1 veh_redbase_1)
)
)
(if (= (volume_test_object syncbox veh_red_2) true)
(begin
(object_teleport veh_red_2 veh_redbase_2)
(object_set_facing veh_red_2 veh_redbase_2)
)
)
(if (= (volume_test_object syncbox veh_red_3) true)
(begin
(object_teleport veh_red_3 veh_redbase_3)
(object_set_facing veh_red_3 veh_redbase_3)
)
)
(if (= (volume_test_object syncbox veh_red_4) true)
(begin
(object_teleport veh_red_4 veh_redbase_4)
(object_set_facing veh_red_4 veh_redbase_4)
)
)
(if (= (volume_test_object syncbox veh_red_5) true)
(begin
(object_teleport veh_red_5 veh_redbase_5)
(object_set_facing veh_red_5 veh_redbase_5)
)
)
(if (= (volume_test_object syncbox veh_red_6) true)
(begin
(object_teleport veh_red_6 veh_redbase_6)
(object_set_facing veh_red_6 veh_redbase_6)
)
)
(if (= (volume_test_object syncbox veh_blue_1) true)
(begin
(object_teleport veh_blue_1 veh_bluebase_1)
(object_set_facing veh_blue_1 veh_bluebase_1)
)
)
(if (= (volume_test_object syncbox veh_blue_2) true)
(begin
(object_teleport veh_blue_2 veh_bluebase_2)
(object_set_facing veh_blue_2 veh_bluebase_2)
)
)
(if (= (volume_test_object syncbox veh_blue_3) true)
(begin
(object_teleport veh_blue_3 veh_bluebase_3)
(object_set_facing veh_blue_3 veh_bluebase_3)
)
)
(if (= (volume_test_object syncbox veh_blue_4) true)
(begin
(object_teleport veh_blue_4 veh_bluebase_4)
(object_set_facing veh_blue_4 veh_bluebase_4)
)
)
(if (= (volume_test_object syncbox veh_blue_5) true)
(begin
(object_teleport veh_blue_5 veh_bluebase_5)
(object_set_facing veh_blue_5 veh_bluebase_5)
)
)
(if (= (volume_test_object syncbox veh_blue_6) true)
(begin
(object_teleport veh_blue_6 veh_bluebase_6)
(object_set_facing veh_blue_6 veh_bluebase_6)
)
)
(if (= (volume_test_object syncbox veh_extra_1) true)
(begin
(object_teleport veh_extra_1 veh_police_1)
(object_set_facing veh_extra_1 veh_police_1)
)
)
(if (= (volume_test_object syncbox veh_extra_2) true)
(begin
(object_teleport veh_extra_2 veh_police_2)
(object_set_facing veh_extra_2 veh_police_2)
)
)
)
)
)
)


There are 2 other scripts that are compiled in the map - the cutscene title script and a simple killbox script.
Edited by Black Crypt on May 29, 2013 at 08:50 PM


casual mods
Joined: May 2, 2013

I be chillin


Posted: Jun 5, 2013 07:29 PM    Msg. 199 of 231       
(global short ai_living 2)
(global short points 0)
(script continuous points
(set developer_mode 127)
(cls)
(inspect points)
(ai_living_count day_1)
(sleep_until (!= (ai_living_count day_1)) (ai_living)
)

"the left prethesis are unmatched"
(script continuous points

what did i do wrong?


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Jun 5, 2013 07:33 PM    Msg. 200 of 231       
You are missing a parenthesis.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jun 5, 2013 08:35 PM    Msg. 201 of 231       
Why did you merge and break those two scripts?.... You're missing 90% of the first script, and the only part you kept serves to break the second one.
(global short points 0)
(global short living 0)
(script continuous add_points
(sleep_until (!= living (ai_living_count random_encounter)) 5)
(if (> living (ai_living_count random_encounter))
(set points (+ points (- living (ai_living_count random_encounter))))
)
(set living (ai_living_count random_encounter))
)
(script continuous display_points
(set developer_mode 127) ;;Just so all console info prints without hinderance
(cls) ;;Clear any console text
(inspect points) ;;Display global as console text
(sleep 10) ;;Delay 1/3rd of a second before repeating.
)





And blackcrypt (rawr, why you edit message after ive already read it, people never see things then lol), that shouldnt happen. It wouldnt respawn while someones in it, and thats the only way it gets to the sync room. Anyways, since your object_teleporting it, even if the players where inside of it, it would carry them with the vehicle.


casual mods
Joined: May 2, 2013

I be chillin


Posted: Jun 6, 2013 01:12 AM    Msg. 202 of 231       
(script startup ready
(object_destroy ai_spawner2)
(object_destroy ai_spawner3)
(device_get_position ai_spawner1)
(sleep_until (= (device_get_position ai_spawner1) 1) 15)
(wake enemies_a)
(device_get_position ai_spawner2)
(sleep_until (= (device_get_position ai_spawner2) 1) 15)
(wake enemies_aa)
)
(script dormant enemies_a
(ai_place enemies/a)
(object_destroy ai_spawner1)
(sleep_until (= (ai_living_count enemies) 0) 90)
(object_create ai_spawner2)
)
(script dormant enemies_aa
(ai_place enemies/aa)
(object_destroy ai_spawner2)
(sleep_until (= (ai_living_count enemies) 0) 90)
(object_create ai_spawner3)
)

[line 6] this is not a valid script name enemies_a
[line 1] this left parenthesis is unmatched (script startup ready

where did i mess up?
Edited by casual mods on Jun 6, 2013 at 03:35 AM

thanks gameuser 10

(script dormant enemies_a
(ai_place enemies/a)
(object_destroy ai_spawner1)
(sleep_until (= (ai_living_count enemies) 0) 90)
(object_create ai_spawner2)
)
(script dormant enemies_aa
(ai_place enemies/aa)
(object_destroy ai_spawner2)
(sleep_until (= (ai_living_count enemies) 0) 90)
(object_create ai_spawner3)
)
(script startup ready
(object_destroy ai_spawner2)
(object_destroy ai_spawner3)
(device_get_position ai_spawner1)
(sleep_until (= (device_get_position ai_spawner1) 1) 15)
(wake enemies_a)
(device_get_position ai_spawner2)
(sleep_until (= (device_get_position ai_spawner2) 1) 15)
(wake enemies_aa)
)

it works now.
Edited by casual mods on Jun 7, 2013 at 05:13 PM


game user10
Joined: Dec 9, 2011

Who is the Overseer?


Posted: Jun 7, 2013 01:19 AM    Msg. 203 of 231       
The dormant scripts must be typed before they are called. Move them up.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jun 7, 2013 11:22 PM    Msg. 204 of 231       
Quote: --- Original message by: Tiel
what will and what will not sync? Like, say I want to have a turret automatically target players once they enter a trigger zone ala Snowbound. I don't think it'd matter if the AI wrecking people would sync, but I'm not exactly familiar with the ins and outs of the engine.

Things associated with AI will not sync while associated with AI. Things that sync.. Basically, anything with the subclass item (So, weapons, equipment, etc) and unit (vehicle, biped). Of course, this is when they aren't associated with AI. So, you wont see the weapon till the AI dies, the vehicle is dragged out of sync till the AI is dealt with, etc. Positions are basically the only thing that is synced with that, no health, no object name, etc.
Quote: --- Original message by: Tiel
Secondly, would it be possible to 'unlock' an area for respawning by driving up to it? Not quite on the scale of something like, say, Territories or Battlefield 2's Conquest gametype, just driving up into a designated area 'awakens' dormant spawnpoints in the area.

It wouldn't be by using normal respawn points, but by having a trigger volume the players spawn in, and then it teleports them to an appropriate spawn point.
(global boolean area_1 false)
(global boolean area_2 false)
(global boolean area_3 false)
(global short number 0)
(global boolean spawned false)
(script static unit player (unit (list_get (players) number)))
(script continuous respawning
(if (volume_test_object respawn_vol (player))
(begin_random
(if (and (not spawned) area_1) (begin (object_teleport (player) area_1_flag_1) (set spawned true)))
(if (and (not spawned) area_1) (begin (object_teleport (player) area_1_flag_2) (set spawned true)))
(if (and (not spawned) area_1) (begin (object_teleport (player) area_1_flag_3) (set spawned true)))

(if (and (not spawned) area_2) (begin (object_teleport (player) area_2_flag_1) (set spawned true)))
(if (and (not spawned) area_2) (begin (object_teleport (player) area_2_flag_2) (set spawned true)))
(if (and (not spawned) area_2) (begin (object_teleport (player) area_2_flag_3) (set spawned true)))

(if (and (not spawned) area_3) (begin (object_teleport (player) area_3_flag_1) (set spawned true)))
(if (and (not spawned) area_3) (begin (object_teleport (player) area_3_flag_2) (set spawned true)))
(if (and (not spawned) area_3) (begin (object_teleport (player) area_3_flag_3) (set spawned true)))

(if (not spawned) (begin (object_teleport (player) area_default_flag_1) (set spawned true)))
(if (not spawned) (begin (object_teleport (player) area_default_flag_2) (set spawned true)))
(if (not spawned) (begin (object_teleport (player) area_default_flag_3) (set spawned true)))
)
)
(set spawned false)
(if (< number (list_count (players))) (set number (+ number 1)) (set number 0))
)
(script continuous open_area
(sleep_until (or (volume_test_objects area_1_vol (players)) (volume_test_objects area_2_vol (players)) (volume_test_objects area_3_vol (players))) 15)
(if (volume_test_objects area_1_vol (players)) (set area_1 true))
(if (volume_test_objects area_2_vol (players)) (set area_2 true))
(if (volume_test_objects area_3_vol (players)) (set area_3 true))
(sleep 10)
(if (and area_1 area_2 area_3) (sleep -1)) ;;If they're all activated, turn this script off, we dont need it anymore
)

Quote: --- Original message by: Tiel
Likewise, if at all possible I'd like the inverse to also hold true - if x amount of the enemy team are in the area, the spawnpoints return to their dormant state until they are removed, upon which they will remain such until enemies are no longer in the trigger area and the first check activates again.
At that point, you have to worry about teams. You can go the safe route and ask OS for the results, or hope for the best, and spawn AI of each team in the spawn area, and see which group gets upset about the players presence. So, you then have to store each player in a global for their team, and since it could be a 16vs0 game, it means you do need 32 different globals for accurate results. Anyways, then you have your trigger volume, nad you tally up how many of each team are in there and add it to the above.

I'm a little busy this week, so if you want it that badly, say so, and ill get around to it another time.

Quote: --- Original message by: Tiel
Lastly, can you hook into the victory conditions? I haven't played Halo CE in a while, so forgive me if I'm mistaken, but in order to win a team deathmatch your team has to have a specified amount of kills, right? Could you make a script so that when this occurs, everyone gets a cute little cutscene of something blowing up? Would that sync?
OS can check the amount of kills people have, as well as any of the game types winning conditions.. So, with OS, having something trigger at the end of slayer would be plausible. Only issue is, you only have 3 or so seconds to show it before the postgame carnage report comes up. So, if your cutscene is 3 seconds long, triggered by winning slayer, sure.


Quote: --- Original message by: Tiel
(oh, btw, just a quick sidenote - would the best way of making caves be making a polygon in the desired shape and then booleaning it through the terrain?)
Im pretty sure the "correct" way would be polygon, although boolean is definitely easiest. As well, in H2 BSPs (Well, I only paid that much attention in delta halo for H2SPP), there seems to be plenty of evidence laying about that bungie modeled a lot of things with the boolean tool, so if bungie accepts it, sure, im not gonna be fussy lol.

Quote: --- Original message by: Tiel
edit: Is it also feasible to deny a team access to entering a vehicle?

You can deny all players, so you can setup the denial anytime the enemies are beside it. Of course, unless you want a lot of trigger volume for that, you're gonna want opensauce to do it. Read the boost document, check the team, trigger the lock. In 3.1.1, you'll be able to determine vehicle type without entering, using the radius command (it exists in 3.1.0, but it wasnt working).
Quote: --- Original message by: Tiel
edit2: Okay, srysly, last thing. How does one go about creating a map without any FP whatsoever? Is this controlled by weapons or is there a global first person animation thingie in Sapien? Basically I'm trying to pull off this without the confusion having an elite running around with spartan arms would cause.

If it is possible to control FP via weapons, is it possible to remove weapon drops entirely? Like, say, I charge red team guy with rocket launcher, but instead of dropping it disappears into puff of smoke, or just gets garbage collected before it hits the ground? Gamma did this in Portent Firefight, but after looking at the script I myself can't quite wrap my head around how he did it.

The FP arms themselves are in the globals, they merge with the weapon FP model, and they only show if the weapon has correct FP (model + animations)

(unit_doesnt_drop_items <object_list>)


Black Crypt
Joined: Jun 30, 2008

Xfire : blackcrypt


Posted: Jun 9, 2013 01:33 PM    Msg. 205 of 231       
Quote: --- Original message by: kirby_422
Why did you merge and break those two scripts?.... You're missing 90% of the first script, and the only part you kept serves to break the second one.
(global short points 0)
(global short living 0)
(script continuous add_points
(sleep_until (!= living (ai_living_count random_encounter)) 5)
(if (> living (ai_living_count random_encounter))
(set points (+ points (- living (ai_living_count random_encounter))))
)
(set living (ai_living_count random_encounter))
)
(script continuous display_points
(set developer_mode 127) ;;Just so all console info prints without hinderance
(cls) ;;Clear any console text
(inspect points) ;;Display global as console text
(sleep 10) ;;Delay 1/3rd of a second before repeating.
)





And blackcrypt (rawr, why you edit message after ive already read it, people never see things then lol), that shouldnt happen. It wouldnt respawn while someones in it, and thats the only way it gets to the sync room. Anyways, since your object_teleporting it, even if the players where inside of it, it would carry them with the vehicle.


...because the board won't allow you to self-bump.

This tp to the sync room definitely happens because I hadn't told anyone about my sync room and they described it in perfect detail.


heempy
Joined: Apr 13, 2011


Posted: Jun 17, 2013 02:08 PM    Msg. 206 of 231       
Hey guys it there a way to have bipeds gain active camouflage?
I remember doing it before but I seem to have forgotten.
all I remember it that the script cannot be reversed.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jun 22, 2013 12:24 AM    Msg. 207 of 231       
Question: Do startup scripts activate for each player when they join? Like if i made a script like

(script startup welcome
(sv_say "welcome to the game")
)


Would it that pop up on every player's screen just as they joined the game?


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Jun 22, 2013 12:29 AM    Msg. 208 of 231       
I think it would pop up for everyone every time a player joins on everyone's screen, because it is telling the server to say "welcome to the game" every time someone starts the map
Edited by OrangeJuice on Jun 22, 2013 at 12:29 AM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jun 22, 2013 12:56 AM    Msg. 209 of 231       
Quote: --- Original message by: grunt_eater
Question: Do startup scripts activate for each player when they join? Like if i made a script like

(script startup welcome
(sv_say "welcome to the game")
)


Would it that pop up on every player's screen just as they joined the game?

Scripts run independently on each persons PC, meaning if the commands used worked on client PCs, it would display.

However, what you're using there is a SV command. SV commands can only be executed on the host (Or, through RCON (Remote CONsole) since that's still making it execute on the hosts PC). What you want in this situation, is a cinematic title to welcome the players.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jun 22, 2013 08:17 AM    Msg. 210 of 231       
Well, i was actually just using that as an example. What i really wanted to know was if startup scripts ran for each person when they joined the game.

So if i put a man cannon vehicle in a map set not to spawn at all, with an enter animation of the player actually moving through the man cannon, and ran a script like

(script startup fixitall
(object_create_anew cannon1) ;;create the cannon for each person when they join so it will sync
)
(script continuous check
(sleep_until (volume_test_object (unit (list_get (players) 0))))
(vehicle_load_magic cannon "passenger" (unit (list_get (players) 0)))
(sleep 97) ;;amount of frames for the animation.
(unit_enter_vehicle (unit (list_get (players) 0)) exit-vehicle "driver") ;;make's you get out.
)


Does this work?
Edited by grunt_eater on Jun 22, 2013 at 08:56 AM

 
Page 6 of 7 Go to page: · 1 · 2 · 3 · 4 · 5 · [6] · 7 · Prev · Next

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 4:10 AM 343 ms.
A Halo Maps Website