
game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Sep 24, 2012 10:20 AM
Msg. 71 of 231
Forgot to include the other parts. (global short enc1_num 0) (script static unit enc1_unit (unit (list_get (ai_actors Player1) enc1_num))) (script continuous player1teleporter1 (if (volume_test_object Teleporter1a (enc1_unit)) (begin (ai_command_list Player1 Teleporter1a) (sleep_until (not (volume_test_object Teleporter1b (enc1_unit))) 5) )) (if (volume_test_object Teleporter1b (enc1_unit)) (begin (ai_command_list Player1 Teleporter1b) (sleep_until (not (volume_test_object Teleporter1a (enc1_unit))) 5) )) (if (< enc1_num (list_count (ai_actors Player1))) (set enc1_num (+ enc1_num 1)) (set enc1_num 0)) ) This is a command list applied to an encounter with a single actor in it. The command list will make them use a nearby teleporter.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Sep 24, 2012 11:32 AM
Msg. 72 of 231
AI can't use real teleporters, which is why I had the object_teleport command.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Sep 24, 2012 11:59 AM
Msg. 73 of 231
That's why the command list made them move to the teleporter and then teleport to a point.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Sep 25, 2012 12:37 PM
Msg. 74 of 231
Quote: --- Original message by: Private CabooseA question from Grunt Eater Quote: --- Original message by: grunt_eater So i'm trying to make a parachute, i had the idea to make a vehicle and place 4 markers and attach each corner of a flag (widget) to each marker. The make the flag have some slack in it so when it catches the wind, and matches with the vehicles low gravity scale, it would look like the flag was taking the weight. So does anyone know how to do this? thanks in advance, btw. Thanks for posting that, but it doesn't require a script. Lol. I'm talking about the flag(widget) attachment. Tag only. It can have 5 attachment points, but no matter what i try when i add more then 2 it looks mangled and destroyed. So i just gave up on it, figured i could get a similar effect with modeling and animations :P I mean, it wouldn't look as good, but whatever i guess. Lol.
|
|
|

hoboscience
Joined: Apr 22, 2011
|
Posted: Sep 25, 2012 12:46 PM
Msg. 75 of 231
I have a script I'm interested in...
Say you have a vehicle that is a Jet. After being shot down, the jet explodes and the player piloting the jet spawns into a another vehicle that is a parachute. Possible?
|
|
|

MoooseGuy
Joined: Aug 10, 2008
I Approve This Message.
|
Posted: Sep 25, 2012 01:05 PM
Msg. 76 of 231
Quote: --- Original message by: hoboscience I have a script I'm interested in...
Say you have a vehicle that is a Jet. After being shot down, the jet explodes and the player piloting the jet spawns into a another vehicle that is a parachute. Possible? (script startup hobosciencething (sleep_until (= (unit_get_health (jet)) 0)) (unit_exit_vehicle (unit (list_get (players) 0))) (effect_new_on_object_marker EXPLOSION jet MARKER) (sleep TIME) (object_create parachute) (objects_attach (unit (list_get (players) 0)) "" parachute "") (objects_detach (unit (list_get (players) 0)) parachute) (vehicle_load_magic parachute DRIVER (unit (list_get (players) 0))) ) This should do something to that effect. Edited by MoooseGuy on Sep 25, 2012 at 01:08 PM
|
|
|

hoboscience
Joined: Apr 22, 2011
|
Posted: Sep 25, 2012 01:14 PM
Msg. 77 of 231
Your da Man!  I'll test this out later...Thanks
|
|
|

MoooseGuy
Joined: Aug 10, 2008
I Approve This Message.
|
Posted: Sep 25, 2012 01:15 PM
Msg. 78 of 231
No problem, tell me if anything goes wrong with it.
|
|
|

hoboscience
Joined: Apr 22, 2011
|
Posted: Sep 25, 2012 08:04 PM
Msg. 79 of 231
*deleted* Edited by hoboscience on Sep 25, 2012 at 08:05 PM
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Sep 29, 2012 08:13 AM
Msg. 80 of 231
Woohoo it works! AI use teleporters! But not very often, even if they're standing in the trigger volume. Also, what does this do? (if (< enc1_num (list_count (ai_actors ENCOUNTER1))) (set enc1_num (+ enc1_num 1)) (set enc1_num 0)) )
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Sep 29, 2012 01:44 PM
Msg. 81 of 231
that goes through the entire encounter, so one script can handle an entire encounter. The entire script was built to work with as many AI as you wanted, with a single script.
|
|
|

creator843
Joined: Jul 10, 2012
I LOVE HALO!
|
Posted: Sep 29, 2012 02:34 PM
Msg. 82 of 231
sombady knows how i make an script so that when you betray someone,or kill yourself sounds a dialogue like halo reach?
example:you kill your teammate *dialogue: BETRAY!*, kill yourselft *dialogue:SUICIDE!*
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Sep 29, 2012 03:42 PM
Msg. 83 of 231
http://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces#player_data_get_integerJust use OS, watch their suicide count, friendly kill count, etc. anytime it increases, play the sound. eg, (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) ) Basically do copies of that for all the conditions you want to watch, etc.
|
|
|

creator843
Joined: Jul 10, 2012
I LOVE HALO!
|
Posted: Sep 29, 2012 06:04 PM
Msg. 84 of 231
Quote: --- Original message by: kirby_422http://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces#player_data_get_integerJust use OS, watch their suicide count, friendly kill count, etc. anytime it increases, play the sound. eg, (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) ) Basically do copies of that for all the conditions you want to watch, etc. JUST WITH OS? NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!
|
|
|

HaloExtreme117
Joined: May 5, 2012
~Gone~
|
Posted: Sep 29, 2012 06:06 PM
Msg. 85 of 231
Quote: --- Original message by: creator843Quote: --- Original message by: kirby_422http://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces#player_data_get_integerJust use OS, watch their suicide count, friendly kill count, etc. anytime it increases, play the sound. eg, (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) ) Basically do copies of that for all the conditions you want to watch, etc. JUST WITH OS? NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!! Use OS.... Obey HaloExtreme117 and kirbah. Seriously though, that isn't gonna be easy without OS scripting.
|
|
|

creator843
Joined: Jul 10, 2012
I LOVE HALO!
|
Posted: Sep 29, 2012 06:09 PM
Msg. 86 of 231
Quote: --- Original message by: haloextreme117Quote: --- Original message by: creator843Quote: --- Original message by: kirby_422http://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces#player_data_get_integerJust use OS, watch their suicide count, friendly kill count, etc. anytime it increases, play the sound. eg, (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) ) Basically do copies of that for all the conditions you want to watch, etc. JUST WITH OS? NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!! Use OS.... Obey HaloExtreme117 and kirbah. Seriously though, that isn't gonna be easy without OS scripting. then.... it is possible without OS?.....interesting..
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Sep 29, 2012 07:05 PM
Msg. 87 of 231
You can do gimmicks to act like it without OS, but it would be horribly inaccurate. basically check whose looking at someone when they die. If more than one person is looking, it cant tell. And you'll need to be playing CTF so it can accurately determine teams without OS, since during other team based games you spawn at any spawn point and not necessarily your own teams spawn point (although you can implement a SECOND gimmick (far more accurate and usable than the first one though) that uses an AI; place the AI in a room, and if the AI determines you're an enemy, then you're not on the same team as the AI)
But even if it was only 2 people on the same team, they can throw a grenade down, both face opposite directions.. the script wont know who did it without OS. As far as os-less gimmicks can go, it would assume both players committed suicide. Or, say someone commited sucide while someone was looking at them; it would assume the person staring at him was the one who killed him.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Oct 5, 2012 09:55 AM
Msg. 88 of 231
Great script, but if I remove that entire encounter thing, would it raise the chances of AI using the teleporter since it's only one actor in the entire encounter?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 5, 2012 12:13 PM
Msg. 89 of 231
Nope, because the script is constantly executing. It even checks how many AI are left in the encounter, so the number of AIs it checks is relative to the encounter.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Oct 6, 2012 09:56 AM
Msg. 90 of 231
Alright then. Here's some questions. How do I use these commands to full effect? ai_magically_see_players ai_force_active Do I have to use a continuous script? Or simply a startup script? Or a startup script that waits until all the AI have spawned? Plus, will using "Ai off", break commands like: (script startup slayeraienhancements (ai_set_respawn "Player1" true) (ai_magically_see_players "Player1") (ai_force_active "Player1" True) ) (script continuous lucario (sleep_until (= lucariojoined false)) (sleep 900) (if (>= (real_random_range 0 1) 0.5) (set lucariojoined true) ) ) or will it not do any harm?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 6, 2012 05:10 PM
Msg. 91 of 231
ai_magically_see_players, it makes them automatically know where the player is. It should just alert them just at that one moment, since you can't turn it off. If you want them to always be aware, I'd toss it in a continuous script. ai_force_active, I'm not exactly sure what it does, as the discription leaves it open for two interpretations. One, would be the obvious always walking idea. Second, comes from the hs_doc discription (ai_force_active <ai> <boolean>) forces an encounter to remain active (i.e. not freeze in place) even if there are no players nearby It appears to be that they will keep moving, even when they are in a separate cluster than the player, since the word "freeze", and directly stating "no players nearby". With this interpretation, it only matters if you have multiple clusters that don't render when you're not inside them. In other words, the PVS camera conditions are always on the AI. (look up pvs in hs_doc.txt if you don't understand that) When (ai false) is activated, all AI will just stand still mindlessly like ordinary bipeds.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Oct 7, 2012 06:06 AM
Msg. 92 of 231
Alright, thanks. Continuous ai_magically_see_players should let AI seem like they actually use the motion sensor.
|
|
|

killzone64
Joined: Jun 9, 2010
sometimes i miss the chaos occasionally
|
Posted: Oct 7, 2012 01:11 PM
Msg. 93 of 231
ok so i have finally started learning how to script and i set up a script to play a recorded animation when the player enters a trigger volume, the animations and everything play just fine in sapien but when i get ingame nothing happens.
script
(script startup example (sleep_until (volume_test_objects dropship_takeoff (players))15) (recording_play cship_intial midriver_1_cship_exit) (game_save_no_timeout) )
trigger volume is called dropship_takeoff, and the vehicle is called cship_initial
what is it that i'm doing wrong?
wait a sec, i just realised that when i hit compile scripts is may say that it was successful but in geurilla the scripts block is blank... how would i fix this Edited by killzone64 on Oct 7, 2012 at 01:13 PM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 7, 2012 03:02 PM
Msg. 94 of 231
Where are you placing the script?
Example <HCE>\tags\levels\test\bloodgulch\bloodgulch.scenario <HCE>\data\levels\test\bloodgulch\scripts\myscript.hsc
|
|
|

killzone64
Joined: Jun 9, 2010
sometimes i miss the chaos occasionally
|
Posted: Oct 7, 2012 10:17 PM
Msg. 95 of 231
ah i see so i need to place it in the data folder, thanks for the help
ok now its saying line 1 parentheses are unmatched no matter how i edit the script it will not compile
do i have to set this up differently if im using os sapien Edited by killzone64 on Oct 7, 2012 at 10:56 PM
|
|
|

Dumb AI
Joined: Sep 18, 2011
Dead.
|
Posted: Oct 7, 2012 11:08 PM
Msg. 96 of 231
What does it look like? Post the script! :D
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 7, 2012 11:25 PM
Msg. 97 of 231
you set it up the same regardless of edited versions of sapien. Anyways, is it the script you listed when you first asked? If so, what error did it give you BEFORE it claimed parenthesis where unmatched? (Scripts stop compiling when it encounters an error, so the parenthesis will be unmatched when there is another error occurring)
|
|
|

killzone64
Joined: Jun 9, 2010
sometimes i miss the chaos occasionally
|
Posted: Oct 8, 2012 08:43 AM
Msg. 98 of 231
ye it was that same one, i fixed the issue though, all i did was rewrite the script and it worked fine.
this is the complete error message i was getting
10.07.12 20:06:03 [dropshipsbeachside line 1] this left parenthesis is unmatched.: (script startup example
10.07.12 20:06:03 recompiling scripts after scenarios were merged. 10.07.12 20:06:03 this left parenthesis is unmatched.: (script startup example
its fixed now thanks for the help Edited by killzone64 on Oct 8, 2012 at 08:43 AM
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Oct 19, 2012 05:18 AM
Msg. 99 of 231
Is there any way to make CMT's health regen script faster? (global short regen_level 2) (script continuous CMT_healthregen (sleep_until (>= (unit_get_shield (player0)) 1)) (sleep 60) (if (and (> regen_level 0) (>= (unit_get_shield (player0)) 1)) (begin (if (and (>= regen_level 2) (>= (unit_get_health (player0)) 0.60) (< (unit_get_health (player0)) 1)) (unit_set_current_vitality (player0) (+ (* (unit_get_health (player0)) 75) 3) (* (unit_get_shield (player0)) 100)) (if (and (>= regen_level 2) (>= (unit_get_health (player0)) 0.30) (< (unit_get_health (player0)) 0.66)) (unit_set_current_vitality (player0) (+ (* (unit_get_health (player0)) 75) 3) (* (unit_get_shield (player0)) 100)) (if (and (>= regen_level 1) (> (unit_get_health (player0)) 0) (< (unit_get_health (player0)) 0.33)) (unit_set_current_vitality (player0) (+ (* (unit_get_health (player0)) 75) 3) (* (unit_get_shield (player0)) 100)) ) ) ) ) ) )
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Oct 19, 2012 05:40 AM
Msg. 100 of 231
I'd change the (sleep 60) command if you want it to be faster, 60 ticks is = to 2 seconds, so its only updating every 2 secs. If you want it to update every 1 second then change it from "60" to "30".
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Oct 19, 2012 09:53 AM
Msg. 101 of 231
I tried that already, I'll just set it to 15 for now.
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Nov 1, 2012 06:17 AM
Msg. 102 of 231
I made a script to kill the player if you look at something for 3 seconds but it only works once and doesn't restart the script.
(Script continuous look_n_die (Sleep_until (> (Objects_can_see_object (list_get (players) 0) slendy 70) 0) 1) (Sleep 100) (If (Objects_can_see_object (list_get (players) 0) slendy 70) (Unit_kill (unit (list_get (players) 0)))) )
Anything wrong?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Nov 1, 2012 11:29 AM
Msg. 103 of 231
you don't need the (> for the sleep_until, objects_can_see_object already returns true or false (Which you seemed to of been aware of during the if statement.. idk why you did that for the sleep_until lol). There isn't anything in there that should stop it from working though. Are you playing alone? because the object_list for (players) will shift everytime someone dies, so you might not be player0 the second time you try.
Toss a global variable in there for debugging, as well as manually running the commands in devmode to see where snags are occurring, etc (that player0 really can see this slendy object in a 70 degree FoV, etc)
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Nov 1, 2012 06:51 PM
Msg. 104 of 231
Ok, but I never really learnt how to use globals, what do I write? And it's a single player map. The script works, but it works once, I walk around, look at slendy for 3 seconds, then I die and the level is reset but if I looks at him then look away I don't die like it should but if I look at him after looking away... I don't die, the script doesn't reset.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Nov 1, 2012 07:32 PM
Msg. 105 of 231
to create a global (global <data-type> <name> <initial-value>) eg, (global short myNumber 0) To use a global, just type its name. eg, (if (= myNumber 0) (sv_say "Global is 0")) to change a global's value, (set <name> <value>) eg, (set myNumber 1) to read the value ingame with devmode, (inspect <name>) eg, (inspect myNumber) Anyways, an alternative for your script that requires you to be constantly staring at him would be (global short looking_ticks 0) ;;Global for how long you've been looking. (script static unit player0 (unit (list_get (players) 0))) ;;Shortcut to player0 (script continuous looking (sleep_until (begin ;;LOOP (set looking_ticks (+ looking_ticks 1)) ;;Increment global (or (not (objects_can_see_object (player0) slendy 70)) (= looking_ticks 90)) ;;If the global is 90 (3 seconds), or they are no longer looking at it, stop the loop. ) ;;END LOOP (begin ;;PRE-CHECK (set looking_ticks 0) ;;Before worrying about anything, set looking_ticks back to 0 (sleep_until (objects_can_see_object (player0) slendy 70) 1) ;;Wait until they are looking at it. (+ 0 1) ;;Check the Condition loop every 1 tick. ) ;;END PRECHECK ) (if (= looking_ticks 90) (unit_kill (player0))) ;;After the loop, if they where looking for 3 seconds, kill them. Otherwise, return to top and repeat. )
|
|
|