
game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 6, 2012 03:16 AM
Msg. 106 of 231
Suppose I make a map where you spawn as a hunter, and script: (script continuous meleecheck (sleep_until (= (unit_get_current_flashlight_state (player0)) true)) (magic_melee_attack) (sleep_until (= (unit_get_current_flashlight_state (player0)) false)) (magic_melee_attack) ) Can this be used for multiplayer? As in have two players use the magic_melee_attack to melee each other?
Also, I'd like to know the script you use for syncing AI, the attach-detach vehicle thing.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Nov 6, 2012 12:42 PM
Msg. 107 of 231
(magic_melee_attack) takes no input data, it couldn't be controlled in MP. Just edit the animation tag, and put your melee of choice in the melee slot. There are a few ways you can go about it. One biped per one display vehicle, a set of display vehicles recycled on encounters, etc. One biped to one vehicle is easiest and laziest, with the least number of possible mistakes that could occur. (script static boolean machine_is_host ;;If you're using OpenSauce, delete this script. the same name is an OS command. (!= (unit_get_health server_testing_vehicle) -1) ) (script continuous ai_01 (if (> (unit_get_health ai_biped_01) 0) (begin ;;If they are alive, (objects_attach ai_biped_01 "" ai_display_01 "") ;;You can replace "" with "body", chances are it will look better. (objects_detach ai_biped_01 ai_display_01) (sleep 10) ;;How ever often you want it to update. Halo doesn't sync data that fast though. ) (begin ;;If they aren't alive. (object_teleport ai_display_01 storage_flag) ;;Move the display somewhere so people aren't confused by the lifeless body. (sleep 900) ;;Wait 30 seconds. (object_create_anew ai_biped_01) ;;After the wait time, respawn. (ai_attach ai_biped_01 ai_encounter) ;;Make the biped an AI ;;Because we make the biped into an AI in here, we want the bipeds to be set as "Not Initially Placed" so that this script creates them, otherwise they'll be ai-less. If you dont like that, then put a copy in the script "setup" )) ) (script startup setup (set allow_client_side_weapon_projectiles false) ;;Forces host to control and sync all projectiles. (sleep 5) (if (machine_is_host) (object_create_anew_containing ai_display) ;;Create all the displays. We only want hosts to do this. (begin ;;If they are not the host, we want to have them stop bothering with the scripts (sleep -1 ai_01) ;;This will prevent ai_01 from running. ;;Fill with your copies of AI scripts. (object_destroy_containing ai_biped) ;;If the bipeds exist on non-hosts, murder em. )) ) All my AI use a empty glass shader (invisible) and the vehicles just use the regular gbxmodel and animations. You could rework it so that clients only see the vehicles, and hosts only see the real AI, but im to lazy to explain that right now (since I should be studying for that test I have to day, but for some reason im not)
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 9, 2012 03:06 AM
Msg. 108 of 231
So, magic_melee_attack will make all players melee regardless of how it was initiated?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Nov 9, 2012 10:09 AM
Msg. 109 of 231
I've never used that command, but yes, if it works, then it will make all players melee. I actually believe that the command doesn't do anything, but you can try *shrug*
|
|
|

SeanTheLawn
Joined: Sep 4, 2007
|
Posted: Nov 12, 2012 04:31 PM
Msg. 110 of 231
It's been a while since I modded so I might not be 100% correct on this, but if I remember correctly the magic_melee_attack command does work, but the normal player biped (cyborg) doesn't have a melee attack set up correctly for it to work (Might have been something to do with the animation type, JMA/JMR etc. Can't really remember). Using a hunter/elite/flood biped would work though. And yes, assuming you could make it sync, it would cause ALL players to melee, so it wouldn't be useful in a multiplayer environment. Edited by SeanTheLawn on Nov 12, 2012 at 04:35 PM
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 23, 2012 02:12 PM
Msg. 111 of 231
So, I'm planning to script this multiplayer syncing mega flood with an insane amount of health. I would like it to gain maybe like, 1000 body vitality every time it dies.
Maybe set a global for amount of times it has died?
|
|
|

Dumb AI
Joined: Sep 18, 2011
Dead.
|
Posted: Nov 23, 2012 02:14 PM
Msg. 112 of 231
How are you going to kill it?
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 23, 2012 02:35 PM
Msg. 113 of 231
Forced cooperation of players. It will be impervious (no ping anims) and have an acceleration scale of 0 so it won't get pushed by anything.
|
|
|

Dumb AI
Joined: Sep 18, 2011
Dead.
|
Posted: Nov 23, 2012 02:38 PM
Msg. 114 of 231
I don't think that's going to work out very well.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 24, 2012 05:12 PM
Msg. 115 of 231
So maybe something like: (global short Floodwave 0) (script continuous megaflood (sleep_until ("unit_get_health megaflood") 0) (set floodwave (+ floodwave 1)) (object_create_anew megaflood) (unit_set_maximum_vitality megaflood (+ 1000 (* 500 floodwave))) (unit_set_current_vitality megaflood (+ 1000 (* 500 floodwave))) (ai_attach megaflood aiencounter) )
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Nov 24, 2012 05:22 PM
Msg. 116 of 231
when you set maximum vitality, it'll automatically set current vitality. And dont put quotes around the whole unit_get_health. no quotes needed. And you aren't checking if its dead; infact, that script will continue instantly any time the flood ISNT dead. you want (sleep_until (<= (unit_get_health megaflood) 0) 15) (you can replace the 15 with whatever number you want, its just how often it checks. 15 is half a second)
Also, you should probably include some host checking. Toss some random named vehicle in the map. Then at the top of the script, include (if (= (unit_get_health test_vehicle) -1) (sleep -1)) that'll stop the script from executing if the vehicle, test_vehicle, doesnt exist (So, make sure its something included in globals.globals and will spawn for the host)
I recommend using (list_count (players)) so that the current number of players factors into its health since you're doing it as a coop. That way, a full server of 16 players has to deal with a stronger enemy than a party of 3 players.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Nov 24, 2012 05:28 PM
Msg. 117 of 231
That is brilliant. How exactly do I setup the AI syncing? I have a biped named megaflood and a vehicle out of the map named server_test_vehicle. What else? So far, I have this: (global short Floodwave 0) (global boolean host_server false) (global boolean dedicated_server false) (script startup host_detection (if (= (list_count (players) ) 0) (set dedicated_server true) ) (object_pvs_set_camera host_cam) (object_create_anew server_testing_vehicle) (sleep 30) (if (= (volume_test_object host_vol server_testing_vehicle) 1) (set host_server true) ) )
(script continuous HECANSEEU (ai_magically_see_players megaflood) (sleep 90) )
(script continuous ai_01 (if (> (unit_get_health megaflood) 0) (begin ;;If they are alive, (objects_attach megaflood "body" megaflooddisplay "body") (objects_detach megaflood megaflooddisplay) (sleep 10) ) (begin ;;If they aren't alive. (set floodwave (+ floodwave 1)) (object_teleport megaflooddisplay storage_flag) ;;Move the display somewhere so people aren't confused by the lifeless body. (sleep 450) (object_create_anew megaflood) ;;After the wait time, respawn. (unit_set_maximum_vitality megaflood (+ 2500 (* 500 floodwave)) "0") (unit_set_maximum_vitality megaflood (+ (unit_get_health megaflood) (* 500 (list_count (players)))) "0") (ai_attach megaflood megaflood) ;;Make the biped an AI (ai_disregard megaflooddisplay true) ;;Because we make the biped into an AI in here, we want the bipeds to be set as "Not Initially Placed" so that this script creates them, otherwise they'll be ai-less. If you dont like that, then put a copy in the script "setup" )) ) (script startup setup (sleep 30) (if (= host_Server true) (object_create_anew megaflooddisplay) ;;Create all the displays. We only want hosts to do this. (begin ;;If they are not the host, we want to have them stop bothering with the scripts (sleep -1 ai_01) ;;This will prevent ai_01 from running. ;;Fill with your copies of AI scripts. (object_destroy_containing megaflood) ;;If the bipeds exist on non-hosts, murder em. )) ) Edited by game user10 on Nov 25, 2012 at 04:40 AM
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Dec 10, 2012 11:09 PM
Msg. 118 of 231
I was gonna make a new thread until I remembered this one. Anyways, I want to make a cutscene (the simple part) and I wanted to make it so when the cutscene ends (after an explosion) the camera is blurred in FP view. Like the start of Lumoria ep 1 after the drop pod scene. I went through the entire BSL bible and could only find something that made absolute no sense (to me). (Cinematic_screen_effect_set_filter... ;or something rather, imma on mah iPad and haven't got te bible in front of me
Any help would be great thanks. -Hobbet360
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Dec 14, 2012 01:57 AM
Msg. 119 of 231
Try checking Lumoria's script.
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Dec 14, 2012 04:52 AM
Msg. 120 of 231
I did... there is SOO mush to go through. Ill just do it again... ill report back within the next week or 2. EDIT - >:D mwahaha, found it! (cinematic_screen_effect_start true) (cinematic_screen_effect_set_convolution 1 1 3.00 0.00 7.00) (cinematic_screen_effect_start false)
started looking from the bottom to the top. :D Edited by hobbet360 on Dec 14, 2012 at 05:36 AM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Dec 17, 2012 09:27 PM
Msg. 121 of 231
Quote: --- Original message by: kirby_422 I'm thinking I'll do a PDF on armor abilities today (its gonna be long, and ima makeup whatever I want for abilities; its the system its gonna be about. you can add whatever you want in it.), because I want to get out at least one more PDF before heading back to college tomorrow (And camo is the only question asked, and idk how much longer I could make a PDF about camo than just the post I made already lol) Many months later!.... PS, it was 95% complete back then when I said I was gonna release it, I just needed to add the OS additions for OS users, and bug check (had like 3 spelling errors I had to fix) DownloadI personally don't feel that I made this one as nice as the other ones... Probably because of the huge gap between writing the script and releasing it lol. Feel free to complain and rant about it.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Dec 19, 2012 05:28 AM
Msg. 122 of 231
Thanks! This is gonna be awesome! How would the completed scripts look like if you would only have one player (in a multiplayer map with AI)? Edited by game user10 on Dec 19, 2012 at 05:32 AM
|
|
|

HaloExtreme117
Joined: May 5, 2012
~Gone~
|
Posted: Dec 19, 2012 10:49 AM
Msg. 123 of 231
Quote: --- Original message by: game user10
Thanks! This is gonna be awesome! How would the completed scripts look like if you would only have one player (in a multiplayer map with AI)? Edited by game user10 on Dec 19, 2012 at 05:32 AM AI don't sync. I suggest that you make sure you add a startup script, check if there is >1 players, if so, disconnect.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Dec 19, 2012 01:59 PM
Msg. 124 of 231
No man, like those multiplayer maps you play only by yourself.
|
|
|

nihao123456ftw
Joined: Mar 24, 2012
|
Posted: Dec 19, 2012 04:44 PM
Msg. 125 of 231
-i didn't know that gameuser10 was referring to kirby's script, post deleted- Edited by nihao123456ftw on Dec 20, 2012 at 03:35 AM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Dec 19, 2012 05:57 PM
Msg. 126 of 231
Just read through the tutorial I added on AA, and just reduce it to P0. Basically, do as I do when im guiding people along (where when each player has their own script, I just showed player0. And I had only showed like 4 variables every time it had multiple players, just reduce that to player0) and then since you're not online, that OS only stuff at the bottom, the print area, change it to check the p0 variables and scrap all the other local_player sutff.
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Dec 20, 2012 08:33 PM
Msg. 127 of 231
I'm working on some cutscenes for a campaign I'm working on, I want to have the player spawn somewhere he can't be seen and use a biped to be in the cutscene, then teleport the player back to that player back so they can start playing. I saw it somewhere but forgot.
Thanks - Hobbet360
|
|
|

MoooseGuy
Joined: Aug 10, 2008
I Approve This Message.
|
Posted: Dec 20, 2012 08:53 PM
Msg. 128 of 231
Check Firefight-Descent's script "startup_stuff".
|
|
|

Hobbet360
Joined: Jan 10, 2012
ProTools > ToolPro
|
Posted: Dec 20, 2012 08:55 PM
Msg. 129 of 231
Ok, only have 6 hours and 4 minutes to do it. D:
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Dec 20, 2012 09:01 PM
Msg. 130 of 231
object_teleport will move any object to a flag of your choice. When you're done, just do it again to move em back. If you are keeping the player in a separate cluster, you will require a PVS camera, or else the cutscene will not animate.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Dec 26, 2012 04:04 AM
Msg. 131 of 231
Can you set multiple PVS cameras so the entire map's AI won't freeze?
Oh, and my AI don't seem to want to use the teleporter with your script very often, even with a large trigger volume. Anything to add? (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))
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Dec 26, 2012 02:28 PM
Msg. 132 of 231
I've never tried setting multiple PVS, but I think each time you set one, it removes the last. You can try.
And the script waits until they exit the other side of the teleporter before it will let them re-enter to teleport back. If even one member of the encounter is stuck just sitting in the other side, its gonna wait until he gets out of there before teleporting another member. Having large trigger volumes would actually be bad, since they have to get further away before they are outside of the teleporter.
|
|
|

game user10
Joined: Dec 9, 2011
Who is the Overseer?
|
Posted: Dec 26, 2012 08:10 PM
Msg. 133 of 231
Yes, but I see them walk near a teleporter and not go through for extended periods of time. I'll see if decreasing trigger volume size will help.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jan 1, 2013 08:01 PM
Msg. 134 of 231
So i had a thought. Is there a way to script it so that when the player enters a trigger volume\turns on flashlight\get's in a vehicle\does anything that is detectable by script it switches out shaders on a BSP? i mean, i know for models you could use the (unit_set_permutation) command. but is there a way to swap them out for BSP's?
Please keep in mind that i cannot use OS. So i'm only asking for standard Halo:CE.
Thank you.
|
|
|

HaloExtreme117
Joined: May 5, 2012
~Gone~
|
Posted: Jan 1, 2013 08:11 PM
Msg. 135 of 231
Quote: --- Original message by: grunt_eater So i had a thought. Is there a way to script it so that when the player enters a trigger volume\turns on flashlight\get's in a vehicle\does anything that is detectable by script it switches out shaders on a BSP? i mean, i know for models you could use the (unit_set_permutation) command. but is there a way to swap them out for BSP's?
Please keep in mind that i cannot use OS. So i'm only asking for standard Halo:CE.
Thank you. As far as I know, you can't switch BSP shaders via a script. There's no way to do so.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Jan 1, 2013 08:14 PM
Msg. 136 of 231
you just swap it for another copy of the BSP with the new shaders.
Scripted stuff is what the switch_bsp command is for (everyones using it wrong, the game can automatically switch between BSPs with trigger volumes named bsp<source>,<destination> (eg, bsp0,1). Thats how your meant to change BSPs in SP maps, but last I saw, everyone just used switch_bsp)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jan 1, 2013 08:48 PM
Msg. 137 of 231
Good idea, It's Brilliant! Now i have everything i need to do what i wanted :D though doubling everything will double the file size, wont it? :/
|
|
|

nihao123456ftw
Joined: Mar 24, 2012
|
Posted: Jan 5, 2013 12:23 AM
Msg. 138 of 231
I am showcasing my gametype detector. It is designed to spawn more than 6 vehicles while keeping the ability to set which gametypes the vehicles is allowed to spawn in. I decided to do this as I have recently discovered conditional scripts and I wanted to see how useful they really were (and man, they are. No more millions of if/else blocks for me  ). This really isn't new, a similar concept was used on Coldsnap to change the scenery around in different gametypes. Basically it works by having a netgame weapon that only spawns in certain gametypes and it explodes when dropped like the halo 1 fuel rod gun in campaign. The explosion kills one of the bipeds that you place around the map and the script then detects which gametype is active by detecting when that biped dies Gametype Detector+Gametype Specific Object Spawning
- First, place 4 bipeds in a map (in some place you can't see them, preferably a "sync box") and name them. Place them a bit apart from each other so that the exploding weapon does not kill the other bipeds [gametype_ctf_detect, gametype_slayer_detect, gametype_koth_detect and gametype_oddball_detect]
- In guerilla, open up a .weapon tag and scroll down to "$$$weapon$$$". Tick the box "detonates when dropped". Save as a different .weapon tag.
- Then make a new .damage_effect tag that deals like 500 damage and have a radius of 1 world unit, save.
- Make a .effect tag referencing to that damage_effect tag
- go back into the .weapon tag and set the fields "detonation effect", just above the $$$weapon$$$ section, and the "detonation" field under heat, both to the .effect tag you created
- now make a new item collection tag, weight 100, and add it to sapien. Place them near the feet of each of the 4 bipeds you created, set each to spawn in different gametypes
Now for the script. You'll have to name all the things you want to spawn: (script startup gametype_detector (sleep_until (or (!= (unit_get_health gametype_oddball_detect) 1) (!= (unit_get_health gametype_slayer_detect) 1) (!= (unit_get_health gametype_koth_detect) 1) (!= (unit_get_health gametype_ctf_detect) 1) ) ) (cond (;;begin cond1 (!= (unit_get_health gametype_ctf_detect) 1) (object_create_anew [add "Capture the Flag" objects and vehicles etc. here]) ;;if you add more stuffz here, you may want a (begin) before object_create_anew above or else sapien will scream at you );;end cond1 (;;begin cond2 (!= (unit_get_health gametype_slayer_detect) 1) (object_create_anew [add "slayer" objects and vehicles etc. here]) ;;add more stuffz here );;end cond2 (;;begin cond3 (!= (unit_get_health gametype_koth_detect) 1) (object_create_anew [add "king of the hill" objects and vehicles etc. here]) ;;add more stuffz here );;end cond3 (;;begin cond4 (!= (unit_get_health gametype_oddball_detect) 1) (begin (object_create_anew [add "oddball" objects and vehicles etc. here]) ;;add more stuffz here ) );;end cond4 ) ) Since this was designed for more than 6 vehicles as well, there was an odd bug I encountered earlier before where if the gametype settings made it so that vehicles respawn after a certain period of time then the vehicles I referenced in the script would respawn on the first vehicle spawn point I created in Sapien. To counter this, make your first vehicle inside the sync box area and put a large trigger volume around it (make sure it doesn't intersect other vehicle spawn points or it could cause trouble, that's why you should do it in a sync box.) Now copy this script (note that it is not tested. If it isn't working then you can copy the other version of this script in my earlier post in this thread): (script continuous vehicle_respawn (cond (;;begin cond1 (= (volume_test_object [vehicle_respawn_triggervolume] [vehicle1]) true) (object_create_anew [vehicle1]) );;end cond1 (;;begin cond2 (= (volume_test_object [vehicle_respawn_triggervolume] [vehicle2]) true) (object_create_anew [vehicle2]) );;end cond2 ;;do this for each vehicle in map if it applies ) ) Edited by nihao123456ftw on Jan 5, 2013 at 12:26 AMEdited by nihao123456ftw on Jan 5, 2013 at 12:30 AM
|
|
|

HaloExtreme117
Joined: May 5, 2012
~Gone~
|
Posted: Jan 5, 2013 12:34 AM
Msg. 139 of 231
You can do that, or you can use OS's game_engine_data_get_integer. (game_engine_data_get_integer "type")
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Jan 25, 2013 06:26 PM
Msg. 140 of 231
Hey, kirby\other scripters. Today i had an idea, but i need two command lines to do it. I need to know how to check the team of a specific player in multiplayer, and how to set their team. I'm doing this in a non-OS environment and any advice or suggestion would be highly appreciated.
|
|
|