
kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Jun 22, 2013 01:56 PM
Msg. 211 of 231
1) your volume_test doesnt have any volume, compilation will fail there. 2) you load the player into cannon; you created cannon1 3) You only target player0, these numbers aren't solid. you give it 97 ticks where a new player can join completely breaking the script, and trapping the player inside because of how you're kicking him out. 4) Is this a biped? you use the unit_enter_vehicle for non-OS exiting bipeds, since most of the biped code was turned off (you can also kill a biped then exit with normal exiting scripts, etc). What reason do you have to not use the traditional unit_exit_vehicle, or vehicle_unload?
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jun 22, 2013 09:52 PM
Msg. 212 of 231
Wow...Lot of errors i missed. Thank you for pointing out what i need to fix.
Is it possible to detect a projectile's impact on a biped with scripting?
If the player spawns with a pistol, is there any way to attach an object to a marker on it? Edited by grunt_eater on Jun 23, 2013 at 01:22 PM
|
|
|

Sinow
Joined: Apr 22, 2009
Everybody Lies
|
Posted: Jun 24, 2013 05:37 PM
Msg. 213 of 231
Just thought I'd contribute a bit, I made a health regeneration script a while back and forgot about it until now. Note, I changed the default cyborg biped's health and shield to 100 instead of 75, so this won't work right off the bat unless you change some values either in the script or tags. (script static unit Player (unit (list_get (players) 0)))
(script static real PlayerShield (unit_get_shield (Player)))
(script static real PlayerHealth (unit_get_health (Player)))
(script continuous HealthRegen (sleep 90) (if (= (PlayerShield) 1) (begin (if (and (> (PlayerHealth) 0) (< (PlayerHealth) 0.25)) (begin (unit_set_current_vitality (Player) (+ (* (PlayerHealth) 100) 15) 100)) (sleep 60)) (if (and (> (PlayerHealth) 0.25) (< (PlayerHealth) 0.50)) (begin (unit_set_current_vitality (Player) (+ (* (PlayerHealth) 100) 10) 100) (sleep 90))) (if (and (> (PlayerHealth) 0.50) (< (PlayerHealth) 1)) (begin (unit_set_current_vitality (Player) (+ (* (PlayerHealth) 100) 5) 100) (sleep 120)))))) EDIT: Forgot code tags. Edited by Sinow on Jun 24, 2013 at 05:38 PM
|
|
|

sshers4
Joined: Apr 28, 2013
|
Posted: Jun 25, 2013 08:46 AM
Msg. 214 of 231
Hay guys is there a script where I could walk around the draco ship while its flying? Edited by sshers4 on Jun 25, 2013 at 09:17 AM
|
|
|

ELVEVERX
Joined: Oct 5, 2012
For the great journey
|
Posted: Jun 25, 2013 09:32 AM
Msg. 215 of 231
Quote: --- Original message by: sshers4
Hay guys is there a script where I could walk around the draco ship while its flying? Edited by sshers4 on Jun 25, 2013 at 09:17 AM normal answer = NO Kirby answer = Yes but... unless your really good at scripting and using open sauce i wouldn't bother
|
|
|

sshers4
Joined: Apr 28, 2013
|
Posted: Jun 25, 2013 11:44 AM
Msg. 216 of 231
I don't want to use OS with that.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Jun 25, 2013 01:30 PM
Msg. 217 of 231
If you don't want OS, and the reason you want it to fly is because its a vehicle, then nope. If the reason its "flying" is because its a device doing its set flight, then sure.
|
|
|

sshers4
Joined: Apr 28, 2013
|
Posted: Jun 25, 2013 01:41 PM
Msg. 218 of 231
Quote: --- Original message by: kirby_422 If you don't want OS, and the reason you want it to fly is because its a vehicle, then nope. If the reason its "flying" is because its a device doing its set flight, then sure. So it won't work without using OS?
|
|
|

altis94
Joined: Oct 5, 2012
Join my Discord https://discord.gg/GDVEaRD
|
Posted: Jun 25, 2013 01:56 PM
Msg. 219 of 231
NO.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Jul 7, 2013 07:37 AM
Msg. 220 of 231
I was planning on making some AI spawn and enter a vehicle while the player wasn't looking. I was thinking it could go like... Machines/Vehiclenubs - AI Squad Hog1 - The hog itself AIHog - Flag beneath the hog's spawn point Hogcheck - Trigger volume placed over the hog's spawn point (script static unit player0 (unit (list_get (players) 0)) ) (script continuous Getinthehognubs (if (and (<= (ai_living_count Machines/Vehiclenubs) 0) (not (objects_can_see_flag (players) AIHog 90)) (not (volume_test_object Hogcheck (player0))) (volume_test_object Hogcheck Hog1) ) ;;then (ai_place Machines/Vehiclenubs) ;;else (begin (sleep_until (<= (ai_living_count Machines/Vehiclenubs) 0)) (sleep_until (not (objects_can_see_object (players) Hog1 90))) (object_create_anew Hog1) ) ) )
Will this give me the desired effect? Edited by game user10 on Jul 7, 2013 at 08:44 AM
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jul 10, 2013 06:29 PM
Msg. 221 of 231
Is there a way to make players spawn automatically with scripting? i mean, i know that you can do it in game type options. But say i set a vehicle to only spawn inside a trigger volume on slayer, then ran a script like this. (script continuous gametype-check (sleep_until (volume_test_object testvol "slayer-hog")) (COMMAND-TO-SET-RESPAWN-TIME) ) That would be awesome. Anyone know how i could manage that non-OS?
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Jul 14, 2013 10:34 AM
Msg. 222 of 231
I'm pretty sure there are no scripts commands related to spawning.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jul 14, 2013 02:32 PM
Msg. 223 of 231
Yeah, i moved past it and found what i needed anyway. But thanks.
|
|
|

sshers4
Joined: Apr 28, 2013
|
Posted: Aug 19, 2013 08:48 AM
Msg. 224 of 231
This map I am playing on "a30" it's actually full map a30_A and a30_B multiplayer but I am having problems with the respawn point every time I switch over to blue the second a30_B doesn't show up.
http://www.xfire.com/video/60cc7d
It's there a script for it please?
Help.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Aug 19, 2013 01:29 PM
Msg. 225 of 231
put a giant trigger volumes, one per BSP. When the player enters the trigger volume for the other BSP, switch the BSP, and teleport every single player to the current BSP. (script continuous bsp_change (sleep_until (volume_test_objects second_bsp_trigg (players)) 15) (volume_teleport_players_not_inside second_bsp_trigg second_bsp_flag) (switch_bsp 1) (sleep_until (volume_test_objects first_bsp_trigg (players)) 15) (volume_teleport_players_not_inside first_bsp_trigg first_bsp_flag) (switch_bsp 0) )
|
|
|

sshers4
Joined: Apr 28, 2013
|
Posted: Aug 19, 2013 04:12 PM
Msg. 226 of 231
Quote: --- Original message by: kirby_422put a giant trigger volumes, one per BSP. When the player enters the trigger volume for the other BSP, switch the BSP, and teleport every single player to the current BSP. (script continuous bsp_change (sleep_until (volume_test_objects second_bsp_trigg (players)) 15) (volume_teleport_players_not_inside second_bsp_trigg second_bsp_flag) (switch_bsp 1) (sleep_until (volume_test_objects first_bsp_trigg (players)) 15) (volume_teleport_players_not_inside first_bsp_trigg first_bsp_flag) (switch_bsp 0) ) Thanks kirby, I am going to try it out.
|
|
|

hoboscience
Joined: Apr 22, 2011
|
Posted: Sep 10, 2013 12:48 PM
Msg. 227 of 231
Working with my StarWars map I can't help but think how great it would be if the vehicles could do a 180 animation before hitting the skybox rather than smashing into a invisible wall.
I had trigger volumes setup on all sides of the skybox so when a vehicle intersected with the trigger volume the vehicle would do a 180 degree animation. This worked well but unfortunately when the animation was finished the vehicle would be facing the same direction it was facing when it entered the trigger volume rather than facing the opposite direction.
Kirby gave me some advice and mentioned it would be best if there was a invisible piece of scenery that would spawn at the point of entry that would be used to reposition the vehicle after the animation finishes.
I'm hoping to get some help with this script, any takers? Thanks
|
|
|

jackrabbit
Joined: Apr 27, 2005
Fight Against the Machine of Deth!
|
Posted: Dec 7, 2013 11:46 AM
Msg. 228 of 231
Quote: --- Original message by: hoboscience Working with my StarWars map I can't help but think how great it would be if the vehicles could do a 180 animation before hitting the skybox rather than smashing into a invisible wall.
I had trigger volumes setup on all sides of the skybox so when a vehicle intersected with the trigger volume the vehicle would do a 180 degree animation. This worked well but unfortunately when the animation was finished the vehicle would be facing the same direction it was facing when it entered the trigger volume rather than facing the opposite direction.
Kirby gave me some advice and mentioned it would be best if there was a invisible piece of scenery that would spawn at the point of entry that would be used to reposition the vehicle after the animation finishes.
I'm hoping to get some help with this script, any takers? Thanks Why not use veach teleportation instead? when xwing enter trigger volume telieport. you can then point the exit. any direction you like. you could even make them enter a worm whole first and come out the other side.
|
|
|

casual mods
Joined: May 2, 2013
I be chillin
|
Posted: Dec 23, 2013 04:06 PM
Msg. 229 of 231
can the print or sv_say command return global values?
also can someone help me make this work? i need it to sleep until gmpp_spawn_multiple is greater than gmpp_alive and ai_place gmpp.
(script continuous gmpp_multiple_spawner (sleep_until (>= gmpp_spawn_multiple (gmpp_alive))) (ai_place gmpp) ) Edited by casual mods on Dec 23, 2013 at 04:12 PM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Dec 23, 2013 06:44 PM
Msg. 230 of 231
Quote: --- Original message by: casual mods can the print or sv_say command return global values? If the global variable is a string, sure. Otherwise, nope. OS does have one command that will print out 3 decimal numbers out as a string (The runtime vector stuff), so if its an OS map, you can slightly do it, although really, you dont have much control. Quote: --- Original message by: casual modsalso can someone help me make this work? i need it to sleep until gmpp_spawn_multiple is greater than gmpp_alive and ai_place gmpp. (script continuous gmpp_multiple_spawner (sleep_until (>= gmpp_spawn_multiple (gmpp_alive))) (ai_place gmpp) ) So, is this gmpp_spawn_multiple some global variable? And the way you have gmpp_alive written, its a static script? Assuming you have your global variable, gmpp_spawn_multiple, and static script that returns the same data type as the global, then there there is no problem. Still, idk why you want this static script, gmpp_alive, when you could just toss (ai_living_count <ai>) in instead.. And is something changing that global variable? If nothings changing it, then you can just write the number directly in the script.
|
|
|

casual mods
Joined: May 2, 2013
I be chillin
|
Posted: Dec 25, 2013 03:25 PM
Msg. 231 of 231
I need help compiling this script to (set ai_alive (+ 1 ai_alive)) after it does (ai_place grunt/minor_plasma_pistol)) and also after (ai_place grunt/minor_needler))
I tried adding (set ai_alive (+ 1 ai_alive)) a few different ways and just cant get it to compile...
(global boolean spawn_ai false) (global long $ 0) (global long grunts_killed 0) (global short grunt_type 0) (global short ai_alive 0) (script continuous place_grunt (sleep_until (= spawn_ai true)) (sleep_until (= 0 (ai_living_count grunt))) (set grunt_type (random_range 0 2)) (cond ((= grunt_type 0) (ai_place grunt/minor_plasma_pistol)) ((= grunt_type 1) (ai_place grunt/minor_needler)) ) (sleep_until (= 0 (ai_living_count grunt))) (set grunts_killed (+ 1 grunts_killed)) (set $ (+ 5 $)) (inspect $) ) Edited by casual mods on May 1, 2014 at 05:25 PM
|
|
|