View Full Version : H2V [SCRIPTS] Few tele things, and Wizard Magic scripts
Kirby_422
June 14th, 2011, 10:46 PM
Teleporter Warthog Script/Tag (why the hell are scripts tags now?) http://www.mediafire.com/?1menq623zh8ze2m
Portable Portalz (Far worse than the HCE version) http://www.mediafire.com/?ae89p27o9tb33bc
Wizard Magic (I enjoyed this one the most, senseless and random) http://www.mediafire.com/?942u9e4z4shbz5h
Portable Portals: http://www.youtube.com/watch?v=i-7A3TOVu-M
Ima Wizard! http://www.youtube.com/watch?v=XX8w8dYNlGE
And for your information, each of these scripts is like 10 lines long. They are that simple lol.:tinfoil:
(and yes, most of your download for each of these is the image which is identical in all 3. Those images where from when I uploaded to the halomaps ftp since tags are required to have images of them now.. I still cant get over how scripts are tags, raawwwwrrr)
supersniper
June 14th, 2011, 11:52 PM
no way?? porting SME to H2V ;)
Kirby_422
June 14th, 2011, 11:56 PM
It's alot easier doing scripts than other stuff in H2V lol. You add really anything, and it doesn't show up in the map menu, but atleast scripts work lol.
Resinball
June 15th, 2011, 07:14 AM
That is some excellent progress.
The problem I ran into was getting most scripts to function or sync online.
EDIT: TY for the tip on H2guerillaTST, I never noticed the missing fields such as OBJECT NAMES, was driving me crazy at one point.
Using attach and detach could you spawn a Shotgun that always rides with the Warthog until it is grabbed for use, at which point it would have a respawn condition?
Kirby_422
June 15th, 2011, 01:25 PM
you might have to delay the sleep time between reattaching and stuff, and I'm not testing this in H2V, im just writing what would of worked in HCE using H2V hs_doc.txt
(script continuous shotgunhog
(object_create shotgun1)
(if (< (objects_distance_to_object warthog1 shotgun1) 2)
(begin
(objects_attach warthog1 "winch" shotgun1 "frame")
(objects_detach warthog1 shotgun1)
))
(sleep 30)
)
This won't look the best online, but last I heard, nobody plays this game online anyways(In halo 1, if you placed a .weapon, each computer will see their own version of it, but only the hosts can be picked up). If .weapons placed in a map despawn over time like halo 1, then that object_create will take care of it; whenever the weapon despawns, it will be remade. If the shotgun has been dropped and is away from the warthog, it wont reattach (yay for new H2 script commands) but this could also mean if its hit to hard or moves to fast, it drops the shotgun.. thats reasonable I guess. and somehow it will pickup the shotgun if it drives over it lol. You have 1 second to grab the shotgun between it attaching and detaching.. during this time, its probably going to be falling to the ground... its put on the winch though, reasonable enough.
Kornman00
June 15th, 2011, 02:12 PM
Scripts aren't tags. They used scenario resources for breaking apart scenarios and re-merging the pieces that mattered, or for having other people work on parts of the scenario, then passing off that work (eg, AI or object placements) to the level designer.
Resinball
June 16th, 2011, 08:16 PM
Kirby,
I tested the TeleHog Script on Collateral and it worked great. Next I took it online to one of our dedicated servers along with five other players, so here are the results:
-Its works online!
-The scenery (which used the default 2-Way Teleporter) appeared at X: 0 Y: 0 Z: 0 (floating above the map) instead of in the back of the Hog (as it did when played locally). This could be how I attached it, needs further testing. Perhaps if I used a crate instead.
-When the Hogs are destroyed they never respawn and thus the Teles stay attached to the broken vehicle for the rest of the game.
Here is a link to the compiled (playable) version of the map for anyone interested: H2MT Collateral Scripts (http://www.monstrmoose.com/killsalone/Custom_Maps/Scripts/H2MT_Collateral_Scripts.exe) 25.7MBs (43.8MBs extracted)
----------------------------------------------------------
I've made a few new vehicles but they can only be used with the MMM (MainMenu Mod) installed. The Gravity Ghost is great for all around fun, any idea on how to attach a Gravity Lift (I can do that part with your script) that could be controlled by the primary trigger? I should probably study your other script (Wizard Magic) before asking this one.
It's alot easier doing scripts than other stuff in H2V lol. You add really anything, and it doesn't show up in the map menu, but atleast scripts work lol.BTW, the MMM works by allowing a player to bypasses the restrictions you mentioned.
----------------------------------------------------------
I have some Mines that only work when run over (by a vehicle) or are hit/shot, using a similar Script could I make the Mines explode when someone is too close?
Thanks
Kirby_422
June 16th, 2011, 09:50 PM
I have some Mines that only work when run over (by a vehicle) or are hit/shot, using a similar Script could I make the Mines explode when someone is too close?
(objects_distance_to_object <object_list> <object>)
(effect_new_on_object_marker <effect> <object> <marker/frame>)
Just use those. When so and so object gets in range, cause a explosion effect on the mine object. if these are mines you drop, you could make them constantly use an effect to fire off a projectile that responds with materials like cyborg (im asuming thats still a valid material in h2) that creates a damage effect to destroy the mine causing its destroyed effect so you wouldn't even need scripts.
any idea on how to attach a Gravity Lift (I can do that part with your script) that could be controlled by the primary trigger? I should probably study your other script (Wizard Magic) before asking this one.
There is a problem with that. Primary trigger checking is for single player stuff. But.. if your making a custom vehicle anyways, you can customize the collision to have a shield, and default damage passes through shield (haven't look at this in H2V yet, but its in HCE) and have it a material damage_effects don't normally damage. Then have the firing effect cause damage that CAN hurt this shield. Then have a script that waits till the shield takes damage, and if the shield is damaged cause the gravity lift. I'll look more into H2V's collision setup in a few minutes, see where the options have moved if they are still there.
Edit: So, its not as nice as Halo 1, but it is possible. You can set regions to ignore shield damage, so just have one small region you don't care about it not taking damage, and toss a super powerful shield over it.. next problem is, I don't see anything in damage effects about materials anymore.. So, your gonna have to pick a material that is far off, and small. Have the script heal the shield when damaged so it doesn't accidently kill the vehicle doing this. it has to do alot of damage to the shield, and be a high healthed shield just so that you can tell its this damage hurting the shield and not people shooting that part. (< (unit_get_shield vehicle1) 0.5) when the shield is less than half, etc. and use that to move the grav lift.
-When the Hogs are destroyed they never respawn and thus the Teles stay attached to the broken vehicle for the rest of the game.
To have them respawn, you would first need to determin who is host. There is a few methods in HCE to check this, and the easiest one to have in h2v would be biped squish... problem I see with this though, doesn't H2V use some form of lobby where everyone starts the game at the same time or something? (haven't ever played online, ive only see the network page where it looks like that) If everyone starts at once, this won't work.
(global boolean ishost 0)
(script startup hostchecker
(sleep 60)
(if (< (unit_get_health hosttestbiped) 1) (set ishost 1))
(objects_attach crusherwarthog "" scenery1 "")
(objects_detach crusherwarthog scenery1)
)
(script continuous respawnwarthog1
(sleep_until (= ishost 1) 30)
(sleep_until (<= (unit_get_health warthog1) 0) 1)
(sleep 300)
(object_create_anew warthog1)
(sleep 10)
)
If you are required to do the lobby thing like I spesified above, then your gonna have to use trigger volumes (kill volumes in h2v) which crash h2guerillaTST when I have a scenario with those open.. the host checking makes sure only the host creates a fully healed warthog, because in halo 1 all computers tried to create their own, but only the hosts was real and drivable, joiners just saw fake clones all over.
-The scenery (which used the default 2-Way Teleporter) appeared at X: 0 Y: 0 Z: 0 (floating above the map) instead of in the back of the Hog (as it did when played locally). This could be how I attached it, needs further testing. Perhaps if I used a crate instead.
It looked like that even when you where host? thats extremely strange, because you are required to be nearby the object for it to teleport you, and the host computer is the one that decides weather you are close. You hosted a Live game? Cause if so, im just gonna go with the games are actually hosted elsewhere with Live since I have no other explanation that sounds reasonable.
If you need any clarification on anything, ask.
Resinball
June 17th, 2011, 06:36 AM
The vehicle issue is that I do not want to depend on the MMM (as few have it) thus I want to modify vehicles with scripts that work online and will compile normally.
The scenery does show up correctly host side. Just not on Live. However the teles still function both on and off.
In the .scenario I used under VEHICLES I had to give each a unique ID, simple enough. But some of the options I have to guess what they do such as:
(my Hog settings in bold)
-Origin BSP Index: collateral, None
-Type: Vehicle (this one is obvious)
-Source: Structure, Editor, Dynamic, Legacy
-BSP Policy: Default, Always Placed, Manual BSP Placement
-Editor Folder: None
^If my settings are wrong here then that could be why the tele is not appearing in the correct location when played on Live.
------------------------------------
We discovered a strange issue with the MMM vehicle method. The vehicles would appear on the map while a duplicate of their models would also appear at b_levelroot. To get around this I would lower b_levelroot below the ground mesh. I might be able to get around this by placing vehicles in the way you showed me (with GuerillaTST). However, GuerillaTST refuses to open some .scenarios, at first I thought the file-size was too large but that is not it at all. As some files that where larger (1.4MBs+) opened fine. Still, always nice to have more tools. Korn and a few others told me to name the vehicles but I could never find that field so this is cool, opens more doors for me.
Kornman00
June 17th, 2011, 07:21 AM
Pretty sure the object name fields are editable in Sapien. They should never be edited in Guerilla
Kirby_422
June 17th, 2011, 01:02 PM
I just can't find much to use to identify players or objects with actions online. Unlike Halo 1 where we could check any units flashlight, everything in H2 is basically action_tests which check all players. So that means you'd need to take something like melee, and when that test is found true, quickly toss bipeds infront of everyone and see whose died. But that still doesn't help for your vehicle.
Another option is to make a second map just to load your map. I haven't tried it, but there are commands to load next multiplayer map.
(net_map_name <string>)
network test: sets the name of the scenario to play
(game_multiplayer <string>)
debug map launching: sets the multiplayer variant for the next map.
Only problem I see is that they both seem to be delayed. first one, it just says its sets it, and second, "next map", its still gonna wait until the end of the game.. And I already tried the SP variant and that didn't work which leads me to believe they might be disabled ingame. We might want to make a script discussion thread for all our script tests and such.
Where those scenarios you opened in guerillaTST with kill volumes? because I added one once, and then TST couldn't load the scenario until I removed it.
And Korn, just because I can't do really anything in Sapien with all its lock downs, I do all my stuff in guerilla (mostly because I have a giant box map that if I place anything within x and y 100 to -100, it will be in the bsp) I like placing vehicles in maps, aswell as bipeds.
Resinball
June 17th, 2011, 07:14 PM
Korn,
Unless the option is available from the console, you cannot label the vehicles in Sapien. There is no Objects / Vehicles field for one (only under Game Data \ Netgame Equipment using an .item_collection).
--------------------
Kirby,
Your theory (regarding Kill Trigger Volumes) appears to be true. I can work around it.
Also, if you need any BSPs and textures feel free to use any of these:
http://www.monstrmoose.com/killsalone/Custom_Data_+_Tags/
I didn't provide the exact locations because there are so many and I'm sure you know how to navigate the data/tags.
Resinball
June 20th, 2011, 07:29 AM
Kirby,
The code below does the following: first it disables the players controls, then it takes control of the camera to show the map from high up while moving between different preset locations. When it finishes the tour of the map it places the player in their body and returns the HUD. It also activates the Warthogs lights.
I have not tested it online yet but do not see a reason it will fail.
The overall goal is to provide a spectators view or some kind of intro sequence that can be easily bypassed.
What I want to add to it is the option to skip the camera tour if the player pushes either the primary attack, secondary attack or jumps. Could that be done (in a way that would still work online)?
I figure it would be something like a Wait Until or a If, Else statement? Figured you would know the best method.
(script startup flythrough
(player_enable_input False)
(camera_control True)
(camera_set ui_path_01 0)
(sleep 90)
(camera_set ui_path_02 500)
(sleep 250)
(camera_set ui_path_03 500)
(sleep 250)
(camera_set ui_path_04 500)
(sleep 250)
(camera_set ui_path_05 500)
(sleep 250)
(camera_set ui_path_06 500)
(sleep 250)
(camera_set ui_path_07 500)
(sleep 250)
(camera_set ui_path_08 500)
(sleep 250)
(camera_set ui_path_09 500)
(sleep 250)
(camera_set ui_path_10 400)
(sleep 200)
(camera_set ui_path_11 400)
(sleep 200)
(camera_set ui_path_12 400)
(sleep 200)
(camera_set ui_path_01 300)
(sleep 300)
(camera_control False)
(hud_cinematic_fade 1 0.5)
(show_hud True)
(player_camera_control True)
(player_enable_input True)
(game_can_use_flashlights True)
(weapon_enable_warthog_chaingun_light True)
)
Kornman00
June 20th, 2011, 10:25 AM
I would look into how they script cinematics (as the player can skip those), that should shed some light on how to do it
Kirby_422
June 20th, 2011, 06:51 PM
I'd say take the last part, put it into a seperate script. have a (sleep_until (or (= cutscenevariable 1) (player_action_test_primary_trigger)) 1) on that last part in the new script, a (global boolean cutscenevariable 0) at the top, and a (set cutscenevariable 1) where the last part would of been in the original script. This way, the camera points go through in that one script, if they either fire or the cutscene finishes, it will preform the end cutscene stuff that returns their control. (sorry for having it all over the place, probably would of been easier if I just wrote the script out as an example rather than trying to explain what to change lol) since action tests are for everyone, if anyone was shooting each other, it would end the cutscene so they can avoid danger, etc.
The issues I see with this, is that when you tried the warthog teleporter script on live, the script wasn't displayed being run on any of the people ingame, it was executed elsewhere and the results where transmitted to everyone. Wasn't that meant to be the idea of live anyways? (run servers on microsoft servers so you don't have to worry about hosts with bad latency, etc. so that would explain why the host isn't even running the scripts) So that implies this script which is purely graphical would only work if you where on a network game rather than live. Guess I better remember my live name so I can do online tests lol, haven't used it in forever.
Resinball
June 20th, 2011, 08:50 PM
Korn, I have been looking in those areas with Soldier of Lights Script tool. Figured I should ask the pros first.
------------
Thats basically what I was asking for Kirby. I'll test what I have on Live then I can make an informed decision.
EDIT: Tested on dedicated server and it skips most of the script. Might help if I set it to continuous (instead of startup) and set up the rest how you said so there is a way out of the cinematic loop.
If I applied the script to each player somehow would that help force it to happen?
EDIT EDIT: Added in your code and it tested well (locally) so here is what I have so far:
(global boolean cutscenevariable 0)
(script startup flythrough
(camera_control True)
(camera_set ui_path_01 0)
(sleep 90)
(camera_set ui_path_02 500)
(sleep 250)
(camera_set ui_path_03 500)
(sleep 250)
(camera_set ui_path_04 500)
(sleep 250)
(camera_set ui_path_05 500)
(sleep 250)
(camera_set ui_path_06 500)
(sleep 250)
(camera_set ui_path_07 500)
(sleep 250)
(camera_set ui_path_08 500)
(sleep 250)
(camera_set ui_path_09 500)
(sleep 250)
(camera_set ui_path_10 400)
(sleep 200)
(camera_set ui_path_11 400)
(sleep 200)
(camera_set ui_path_12 400)
(sleep 200)
(camera_set ui_path_01 300)
(sleep 300)
(set cutscenevariable 1)
)and
(script startup activate_hud
(sleep_until (or (= cutscenevariable 1) (player_action_test_primary_trigger)) 1)
(camera_control False)
(show_hud True)
(player_camera_control True)
(player_enable_input True)
(game_can_use_flashlights True)
(weapon_enable_warthog_chaingun_light True)
)
Kirby_422
June 21st, 2011, 01:31 AM
So, what do you mean it skips most of the script? And I got into my live account (Silvers can make games now? I was just able to make a game) You sure the teleporter script didn't activate when you where the host? cause its attached on my computer. Tomorrow I'll do a bunch of live tests (from host side. and if I can get the dedi working, with that too), what all you want me to try? just camera stuff?
Resinball
June 21st, 2011, 01:56 AM
The teleporter script works fine either way, the issue was just the scenery not appearing in the correct location or moving with the Hog, it still teleported locally and from the dedicated server.
Yeah whatever you can get working I'll certainly make use of. Thanks for helping with the camera's. It does much of what I want, too bad its not working on Live for now.
A script that could fire at random coordinates would be nice start for improved mortars.
Kirby_422
June 21st, 2011, 02:43 AM
when I used camera_set with 'Cutscene Camera Points' it just left the camera at 0,0,0. Tomorrow I'll try with cutscene flags like halo 1 uses. I also tried with (camera_set_first_person <unit>) and it worked; I could skip and everything and it moved between them as intended, even when I hosted a live game. I'll try installing the dedi in the morning as well with cutscene flags, im off to bed now.
I'll also test the mortars in the morning, but it basically would comprise of (effect_new <effect> <cutscene_flag>) and either (begin_random <expression(s)>) or (random_range <short> <short>) to decide what order to randomly blast them off in if you feel like trying it, you'll probably be up before me as my time zone is -8
EDIT: So, it wouldn't compile when I used cutscene flags instead of cutscene camera points, so it might be best to use bipeds with camera_set_first_person then a object_destroy after the cutscene. if you want them to move around, just use the set velocity. As soon as I can finish setting up a virtual machine for a dedi, ill try some stuff as a client.
(global short random 0)
(script continuous random_frags
(set random (random_range 0 5))
(if (= random 1) (effect_new "effects\custom\throw_frag" flag1))
(if (= random 2) (effect_new "effects\custom\throw_frag" flag2))
(if (= random 3) (effect_new "effects\custom\throw_frag" flag3))
(if (= random 4) (effect_new "effects\custom\throw_frag" flag4))
(if (= random 5) (effect_new "effects\custom\throw_frag" flag5))
(sleep 30)
) there is a 1/6 chance there won't be a grenade since the range starts at 0, and 0 doesn't create any frag with my script (since I doubt you want constant frags. you can change that easily enough, etc) shoots a frag once a second with that 1/6 skip chance.
just made a new effect and put it into 'effects\custom\' and call it 'throw_frag'. pick anything for the location block, I used 'normal', create a event and a part, the part leads to your projectile of choice, set velocity range at what ever you want, 5 seems fine for frags. you can change the angle if you want them firing in random places from there.
EDIT2: So, apparently hosting a LAN dedi in a virtual machine doesn't show up in the lan lobby. Also, how do you add custom maps to dedi's? they where in the folder it specified, but it gave errors when I tried both their file names with or without .map, aswell as their ingame names. So, all my test will be at most, live hosting tests. But, after my few tests, hosting on live makes no difference than running a lan game, so the scripts do execute properly there.
Resinball
June 21st, 2011, 07:33 PM
Well you know you have to give it coordinates to go to right? I found the Cutscene Camera Points useful because they where easy to set the coordinates (based on existing scenery in the scenario).
Also, they have the dolly option which is what (I believe) rotates the camera when shifting between each position. Either way, if you find a method that works online I'll go with that.
A funny glitch happens with the latest version of the Flythrough script. If the camera is accelerating when you use the primary_trigger then your body appears and continues turning while flying towards your initial spawn location. Doesn't bother me at all, just thought it was funny. It may be fixed by changing the order of commands in the second script.
Mortars look good, I'll let you know how it worked. On my latest beta of Outskirts I have mortars that fire from outside the map to pre-determined locations, this will help randomize em, which is what I want because I want the map to feel like its a real battle happening all around the players so occasionally the mortars will kill you or get in your way. I also have overhead vehicles such as Longsword, Banshee, Phantom and Hornet, some of which fire at semi-random intervals.
Kirby_422
June 21st, 2011, 11:16 PM
By tossing the VM on my laptop, I was finally able to host a dedi and try a few things as a client.
So, scripts don't activate on clients, only host. This means only things that transmit from host to clients will be seen, and things such as camera scripts will not work. Since object_create scripts always have the host send out that its made it like halo 1, these will still work. And you won't have to worry about clients making doubles since the script won't execute on their side. Since effects are transferred from host to client (hadn't ever done much to check this in h1, it was just something I came across, but H2 further strengthens this argument since effects do occur on clients when caused by scripts)
Also, bipeds seem to sync worse than H1. only 1 of my bipeds showed up when I was a client... this will mean that we can't use bipeds to sync.. also, 2/3 vehicles didn't get placed. I could blow them up and have the garbage tags come off (more proof of effects being sent) Problem is that since clients can't run scripts, they can't recreate them if they aren't there since they can't use scripts.
This also explains why you couldn't see the teleporter on the warthog. because on your side it wasn't there. When you where moved though, the server told you that you where moved, so you still got teleported.
Resinball
June 22nd, 2011, 07:03 AM
Well, at least its good to know what we can do.
One thing, we could see the Teleporters (from the back of the Hog), however they did not move with the Hog and they stayed floating in the center of the map at X:0Y:0Z:0, so it was visible.
leorimolo
June 22nd, 2011, 03:19 PM
If you guys want to test anything out hit me up!
Aim: leorimolo
I also have some scritps I want to test online....
Kirby_422
June 22nd, 2011, 03:43 PM
Leorimolo, I'm guessing you never saw the PM on youtube I sent you? anyways, just made a new AIM account, heathcaswell, added you (man its been so long since I used AIM lol)
Resinball
June 23rd, 2011, 07:00 PM
Kirby,
From what I looked at in a HCE scenario file the Cutscene Titles are pretty similar to the ones in H2V. I have the script commands set-up, I have the Chapter Title Text. I copied the same text bounds from an H2X tutorial and compared them to their HCE equivalent yet they still fail to appear anywhere onscreen. Not sure if you have a clue about this one, if so here is the source (the lines commented out are just how I test, you can ignore most of those):
(script startup map_title
(hud_clear_messages)
(show_hud_messages 1)
(map_info)
;; (time_code_start 1)
;; (time_code_show 1)
;; (show_hud_timer 1)
;; (show_hud_help_text 1)
;; (hud_enable_training 1)
;; (hud_show_training_text 1)
;; (player_training_activate_stealth)
;; (hud_set_training_text title)
;;
;; (print "H2MT - Kills Alone of MonstrMoose.com")
;;
(cinematic_set_title "title")
(cinematic_subtitle "subtitle" 60)
)Then in the scenario:
Name(s): Title + Subtitle
Text Bounds: t:425 l:0 b:444 r:597
Font: Title Font + Subtitle Font
Text Color: Blue + Red with a black shadow for each
Fade in Time: 1
Up Time: 120
Fade out Time: 1
*Note that H2V doesn't seem to have the string index option like HCE.
The Chapter Title Text: Cutscene_Title
[Strings]
title= "Outskirts"
subtitle= "H2MT"
Resinball
June 23rd, 2011, 09:05 PM
Another unrelated scripting question.
For a zombies game; could a script force team-change at (anyone but green teams) player death?
Kirby_422
June 23rd, 2011, 10:06 PM
ya, the cutscene titles didn't show up when I tried. and changing teams.. you can attach AI to them (if you can get the AI working) and change the AI's team.. then you can have them treated as enemy. You would play as a free for all, but you should show up as friendly and enemy on the radar.
Picking up and chucking stuff
http://www.youtube.com/watch?v=Kj0ftz0foIU
Also, im on the teamspeak server if you want to talk.
Kornman00
June 24th, 2011, 05:27 AM
Halo 2 uses string_ids now, not raw string indexes. Also IIRC, you need to have called (cinematic_start) before anything will show up.
Kirby_422
June 24th, 2011, 02:14 PM
I put cinematic start into my test. Named the cutscene title and object in the string list the same things. Checked the h2 SP scripts, they called an actual name rather than just a number. Korn, if you could extract a SP scenario tag as well as its cutscene text file, it would help a lot in this, aswell as other things like AI squad setups (unless H2 MP just flatout refuses AI and I've been making fine squads the entire time.. which I believe I have since built-in-gunners don't show up either).
Resinball
June 24th, 2011, 07:53 PM
Korn,
Yep same here, I went through the H2X SP scripts and tried combining all the relevant commands I could find including (cinematic_start) and (cinematic_stop), they were in the following scripts. It doesn't seem to add up because it does compile, does not complain and the map appears in the custom map list.
The only thing I wasn't really sure about was the Cutscene_Title and how its expected to be setup, so I just used the same naming scheme as for other text blocks like the map description and Territory names.
----------------
Kirby,
Remember you can use Gravemind (http://www.monstrmoose.com/MMrepository/Halo_Tools/2_Vista/Gravemind_1.5/Gravemind_1.5.rar)to look at a compiled .map file. It doesn't show everything but occasionally it can be useful for seeing if some sections compiled correctly.
Kirby_422
June 24th, 2011, 09:27 PM
(unless H2 MP just flatout refuses AI and I've been making fine squads the entire time.. which I believe I have since built-in-gunners don't show up either)
So, grabbed shock120's AI spawner app, the text display in the app proves that ^^. Even though I have a script with ai_enable 1, if I load it as MP it says AI deactivated, but if I load that map as SP, it just shows a black screen.. although the red text says AI activated in the AI app. So, I'm thinking if we had a more advanced version of his app, that instead of just setting the engine to SP it forced the AI activated and such, it would enable more SP features (only reason I can see the titles not showing up right now is it being setup to not run on MP, unless korn can give us files that show otherwise)
Resinball
July 2nd, 2011, 08:47 PM
Kirby,
Here is something I noticed in H2GuerillaTST. The first picture is of a older .scenario file I have not (nor ever) added any scripts to. The second picture is of a newer .scenario that has the three scripts we were talking about previously (regarding the cinematic cameras and text).
2158
2159
Notice how the first picture has this script:
(script static unit player0 (unit (list_get (players) 0)))
and while you cannot see all of them from a picture that script no longer exists in the newer .scenario. Could this cause problems? And what exactly does that script accomplish? I could add it back in but I wanted to understand it first. TY
Kirby_422
July 4th, 2011, 12:10 AM
Its just a way for other scripts to refer to the newest joined player. It doesn't change anything (you'll notice in some of my other scripts, I have that same thing in it, except the script name is p0 instead. Or, one that has the word 'number' instead of the 0, and is player instead of player0. player0 is there for SP maps, because thats how they like referring to players in SP) Since scripts don't even execute on everyones computer in multiplayer, its safe to assume they still don't use that script in H2, and it was just left there as remnants from their SP auto setups.
Static scripts are just shortcuts, the type is unit, the name is player0, and the command is (unit (list_get (players) 0)). it basically means that any script below it where they type (player0) it will act as (unit (list_get (players) 0))
Also, when are you ever in the teamspeak server? I gave up on that after 2 days of sitting in there all day lol, haven't checked back there since.
Resinball
July 4th, 2011, 01:30 AM
Okay, I was hoping it was something simple like that.
Garanas
July 4th, 2011, 01:07 PM
Hey, this is something I possed at Monstermoose too, it might help you with some things. (I hope)
It is quite big, but, maybe it is something that hasn't been saw that way before, I don't know.
Tiny letters shoudln't be read ;)
Kills Alone:
----------------------
ETC:
Scripts like the explosive crate creator and destroyer on Colossus require Death Trigger zones that are labeled.
To add objects names and to get more options within a .scenario file use H2GuerillaTST.exe from the Unlocked H2EK. Otherwise you will never see those fields.
Unfortunately, H2GuerillaTST.exe cannot open .scenarios that have Death Trigger zones.
But, I'm quite sure that I have opened it once. I don't know how exactly, but I had all of these fields that I've had never seen before, like "Child Scenario", first I thought it was because I did something magically to the scenario, so I saved it with a different name, later when I tried to open it again it didn't worked, or (with a different guerilla) the fields weren't there.
Maybe I can repeat what I did...
Wait, you mean the Guerilla can't open up scenarios with kill_trigger_volumes into them?
Can't you work around this by deleting the kill trigger volumes you have, but saving the values for it (on paper or something) and then make them in the Guerilla?
Nvm, that doesn't work either. The values don't get saved =/
But, I've just found a way around it, maybe:
Before you add kill_trigger_volumes in your map, you premake (so, you think of what ones you might require) the Object names. And then add the kill trigger volumes, look, this is in sapien:
Now, I don't know what you all have been trying and if this has been tried before, but, maybe this works?
E: You can't open it up with that Guerilla after it anymore... (because of the kill_trigger_volume)
E: After opening it up with Sapien again, the object name "Aname" was still there :D
E: After opening it with the normal (locked) Guerilla, and an unlocked version (non TST), and then opening it up in Sapien again the Object Name was still there, ready to be used.
This might be the way, right?
`
------
Weee, huge post incoming :P
I've seen this command between all the other commands:
data_mine_enable (true/false)
Now, I don't know what it does, but Sapien asked me once for enabling it, so, I did.
And then this new folder called: "test", then another new folder called (inside "Test") "Data Mining" and inside there a .DMD file. Now, this is what I found on a website what they do:
"DMD files contain information that instructs the computer to take certain actions or display data, depending on the program."
And, when opening up the file with Notepad (<3 notepad, it opens up everything :D), I saw some lines like these:
_data_type_position
_data_type_text_location
Maybe this synchronises scripts somehow?
Maybe someone can put this to the test with one of those wizard scripts, and then make a new script with the following in it:
I have no idea what it does, I just thought it might be something. I hope it helps somehow!
E: I've found something else out, apperently they also contain model data (O.o?)
In teory an ".DMD" file is a".MD2" whit LOD graphical support, but i can't found a free program to open it for import/export/editing this file type. Anyone can hep me?
Now, below at the page there is this file that cam change it to a md2, and that file type can be opened up in Blender.
I don't know how to do with command lines in Windows, so I can't test this. Maybe someone else can try it?
Apperently someone else found this already.
Next time I should read the entire post, I guess :(
Kirby_422
July 4th, 2011, 01:35 PM
The kill triggers information came from this very thread, I was the one that announced that guerillaTST wasnt capatible with scenarios with kill triggers. But with the new object distance command, I really dont care about volume triggers. anything item can do that job now.
I know ive ran that command in sapien, and I think I might of done it ingame when I did a test with every button doing a different kind of data dump (incase one causes exceptions, then I can be in control and figure out what I can dump) where did it dump this information to?
If anyones interested, ive written a script that actually crashes sapien and tool on compile rather than just giving error messages lol. idk whats wrong with it, but im gonna blame that region command, as its new for H2, so ive never used it. Never bothered testing that fact though lol.
(global short hog1repair 0)
(script continuous repairhogs
(if (or (< (objects_distance_to_object repair1 warthog1) 3)
(< (objects_distance_to_object repair2 warthog1) 3)
(< (objects_distance_to_object repair3 warthog1) 3)
)
(begin
(object_cannot_die warthog1 1)
(set hog1repair (+ hog1repair 1))
(unit_set_current_vitality warthog1 (+ (* (unit_get_health warthog1) 250) 1) 0)
(if (> hog1repair 50) (begin (object_set_region_state warthog1 "" base) (set hog1repair 0) ))
)
(begin
(object_cannot_die warthog1 0)
(if (> hog1repair 0) (set hog1repair (- hog1repair 1)))
)
)
)
leorimolo
July 4th, 2011, 01:44 PM
I am having a problem using the sevral versions of guerilla, one of them shows scripts in 2 different places, and in both places the scripts are different.
Edit: Also cameras, I was able to leave my body camera but everytime I set up a camera it just looked wrong, could not see any of the bsp and I could only see the sky.... I will try to find the script...
Kirby_422
July 4th, 2011, 01:51 PM
So, you mean where you attach the .scenario_hs_source, and where you can read the script directly in the scenario? sapien updates the scenario with the contents of the hs_sources when you open it, but tool will always compile the hs_source into the final map since you may of changed it, etc. This is one thing I like about H2, I dont have to use sapien to add scripts, tool will do it for me.. now if only hs_source would be edited in notepad while still being considered valid.. (you can open it, and see the script, but there is a area to handle the checksum or something)
Sounds similar to my experiance where the camera stayed at 0,0,0. Any clue about the origins in your BSP? Anyways, the camera will only show up on the host computer, is this cutscene a big thing for your map? cause it might be best to leave it out as only the host can see it anyways even if you perfect it.
Garanas
July 4th, 2011, 01:58 PM
I know ive ran that command in sapien, and I think I might of done it ingame when I did a test with every button doing a different kind of data dump (incase one causes exceptions, then I can be in control and figure out what I can dump) where did it dump this information to?
After having Sapien open up for like 2 hours or something, this new folder in the Halo2MapEditor folder came:
Test > Data_Mining > _0.DMD
Kirby_422
July 4th, 2011, 02:29 PM
So, ran the script ingame, and it doesn't make any files anywhere (checked the halo 2 folder in documents, my games folder, h2 game folder, etc)
Looking through what sapien made when I have run it in the past (aparently ive run it twice, I have _0 and _1) it doesn't looks like it has any worth in sapien, only ingame, where it doesnt run.
And I doubt debug_scripting runs ingame either (run it in sapien) I really dislike testing things without devmode.. its so much easier with it lol.
Also, that script that crashes tool, it is the region commands fault. compiled it into the same map as this test after commenting out that line, and it worked.
leorimolo
July 4th, 2011, 02:42 PM
So, you mean where you attach the .scenario_hs_source, and where you can read the script directly in the scenario? sapien updates the scenario with the contents of the hs_sources when you open it, but tool will always compile the hs_source into the final map since you may of changed it, etc. This is one thing I like about H2, I dont have to use sapien to add scripts, tool will do it for me.. now if only hs_source would be edited in notepad while still being considered valid.. (you can open it, and see the script, but there is a area to handle the checksum or something)
Sounds similar to my experiance where the camera stayed at 0,0,0. Any clue about the origins in your BSP? Anyways, the camera will only show up on the host computer, is this cutscene a big thing for your map? cause it might be best to leave it out as only the host can see it anyways even if you perfect it.
Nah I was just doing random tests, I had the exact same thing happen to me in h2x a couple of years ago. I even used zanzibar which still had the camera placements from taht one multiplayer demo :p
Edit scriptors add me on aim! leorimolo
Edit 2:
(script static unit player0
(unit (list_get (players) 0)))
(script dormant awesomesauce
(sleep_until
(begin
(sleep_until
(if
(and
(not (unit_has_weapon_readied (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon"))
(unit_has_weapon (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon")
)
; Condition met, return true
(= 1 1)
; Condition not met, reset player actions and return false
(begin
(objects_detach (unit (player0)) rock)
(= 1 0)
)
)
;600
1
)
(objects_attach (unit (player0)) "back_pack" rock "")
; Sleep until the player has removed weap from back
(sleep_until
(and
(unit_has_weapon_readied (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon")
(unit_has_weapon (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon")
)
1
)
(objects_detach (unit (player0)) rock)
false)
1
)
)
(script startup turnshiton
(wake awesomesauce)
)
Leaving this one here, it was the one they used to enable invisibility in MP games, basically I just modified it to use it as a backpack weap script...
Garanas
July 4th, 2011, 05:39 PM
Mmhh, maybe you shouldn't be so fast about the data_mine_enable command, you should try to test it online, to see if it synchronises. Just because it doesn't make a file there, doesn't mean it isn't saved in a default file ;)
Everything should be checked!
Kirby_422
July 4th, 2011, 06:12 PM
Mmhh, maybe you shouldn't be so fast about the data_mine_enable command, you should try to test it online, to see if it synchronises. Just because it doesn't make a file there, doesn't mean it isn't saved in a default file ;)
Everything should be checked!
... So what do you think is being synced in it storing debug data?...... (you do realize how strange that sounds, right?..) And if there is no file, then there is no need for it. its debug stuff, you have to directly tell it to upload to a debug server in the commands if you want it to be shared with anything, but what its sending to is still a debug server.
(data_mine_set_mission_segment <string>)
sets the mission segment for single player data mine events
(data_mine_display_mission_segment <boolean>)
display the current mission segment
(data_mine_insert <string>)
insert text and camera position in the data mine
(data_mine_upload)
upload all data mining data files to debug server
(data_mine_playback <string>)
loads and displays data mine data from a file
(data_mine_playback_last)
loads and displays last data mine data
(data_mine_playback_exit)
exit data visualization
(data_mine_enable <boolean>)
enable/disable data mining
(data_mine_track_event <string>)
enable mining of an event
(data_mine_display_event <string>)
enable displaying of an event
(data_mine_show_all_events)
show all data mine events
(data_mine_show_tracked_events)
show what events are being tracked by the data mine
(data_mine_show_displayed_events)
show what events are being displayed by the data mine
(data_mine_display_session_data)
show data mine session, game, and network ids
(data_mine_display_disk_writes <boolean>)
enable/disable console message on disk writes
(data_mine_debug_menu_setting <string>)
close debug menu and set user experience setting to string
(data_mine_open_debug_menu)
open debug menu
leorimolo
July 4th, 2011, 11:56 PM
;matt's global scripts
(script static unit player0
(unit (list_get (players) 0)))
(script static unit player1
(unit (list_get (players) 1)))
(script static short player_count
(list_count (players)))
(script static void end_segment
(camera_control TRUE)
(cinematic_start)
(fade_out 0 0 0 15)
(sleep 30)
(print "End gameplay segment! Thank you for playing!")
(sleep 15)
(print "Grab Jaime or Paul to give feedback!")
(player_action_test_reset)
(sleep 15)
(print "Press the ?A? button to reset!")
(sleep_until (player_action_test_accept))
(print "Reloading map...")
(sleep 15)
(map_reset)
)
; Globals
(global string data_mine_mission_segment "")
; Difficulty level scripts
(script static boolean difficulty_legendary
(= (game_difficulty_get) legendary)
)
(script static boolean difficulty_heroic
(= (game_difficulty_get) heroic)
)
(script static boolean difficulty_normal
(= (game_difficulty_get) normal)
)
; Cutscene skip hacks live again
; Yuck... at least I understand it now
(script static boolean cinematic_skip_start
(cinematic_skip_start_internal) ; Listen for the button which reverts (skips)
(game_save_cinematic_skip) ; Save the game state
(sleep_until (not (game_saving)) 1) ; Sleep until the game is done saving
(not (game_reverted)) ; Return whether or not the game has been reverted
)
(script static void cinematic_skip_stop
(cinematic_skip_stop_internal) ; Stop listening for the button
(if (not (game_reverted)) (game_revert)) ; If the player did not revert, do it for him
)
; Cinematic fade scripts
(script static void cinematic_fade_to_white
; Kill player control
(player_enable_input false)
(player_camera_control false)
; Fade out
(hud_cinematic_fade 0 0.5) ; pbertone 9/23
(cinematic_start) ; pbertone 9/23
(fade_out 1 1 1 30) ; pbertone - changed from 15 to 30 (9/23)
(sleep 30) ; pbertone - changed from 15 to 30 (9/23)
; Edit sound channels, other stuff here
; (cinematic_start)
(camera_control on)
)
(script static void cinematic_fade_from_white
(hud_cinematic_fade 1 0.5)
(cinematic_stop)
; Edit sound channels, other stuff here
(camera_control off)
(fade_in 1 1 1 15)
(sleep 15)
; Restore player control
(player_enable_input true)
(player_camera_control true)
)
(script static void cinematic_fade_from_white_bars
(cinematic_stop)
(cinematic_show_letterbox_immediate true) ; But keep the letterbox up
; Edit sound channels, other stuff here
(camera_control off)
(fade_in 1 1 1 15)
(sleep 15)
; Restore player control
(player_enable_input true)
(player_camera_control true)
)
(script static void cinematic_fade_from_black_bars
(cinematic_stop)
(cinematic_show_letterbox_immediate true) ; But keep the letterbox up
; Edit sound channels, other stuff here
(camera_control off)
(fade_in 0 0 0 15)
(sleep 15)
; Restore player control
(player_enable_input true)
(player_camera_control true)
)
(script static void cinematic_fade_to_black
; Kill player control
(player_enable_input false)
(player_camera_control false)
; Fade out
(hud_cinematic_fade 0 0.5) ; pbertone 9/23
(cinematic_start) ; pbertone 9/23
(fade_out 0 0 0 30) ; pbertone - changed from 15 to 30 (9/23)
(sleep 30) ; pbertone - changed from 15 to 30 (9/23)
; Edit sound channels, other stuff here
; (hud_cinematic_fade 0 0.5)
; (cinematic_start)
(camera_control on)
)
(script static void cinematic_fade_from_black
(hud_cinematic_fade 1 0.5)
(cinematic_stop)
; Edit sound channels, other stuff here
(camera_control off)
(fade_in 0 0 0 15)
(sleep 15)
; Restore player control
(player_enable_input true)
(player_camera_control true)
)
(script static void cinematic_snap_to_black
; Kill player control
(player_enable_input false)
(player_camera_control false)
(fade_out 0 0 0 0)
; Edit sound channels, other stuff here
(hud_cinematic_fade 0 0)
(cinematic_start)
(cinematic_show_letterbox_immediate true)
(camera_control on)
)
(script static void cinematic_snap_to_white
; Kill player control
(player_enable_input false)
(player_camera_control false)
(fade_out 1 1 1 0)
; Edit sound channels, other stuff here
(hud_cinematic_fade 0 0)
(cinematic_start)
(cinematic_show_letterbox_immediate true)
(camera_control on)
)
; Stashing mockups
(script static void cinematic_stash_players
(object_hide (player0) true)
(object_hide (player1) true)
(object_cannot_take_damage (players))
)
(script static void cinematic_unstash_players
(object_hide (player0) false)
(object_hide (player1) false)
(object_can_take_damage (players))
)
;- STEALTH
; Whee, horrible horrible. I can't wait to remove this
(script dormant _stealth_toggle_monitor
(sleep_until
(begin
(sleep_until
(if
(and
(not (unit_has_weapon_readied (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon"))
(unit_has_weapon (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon")
)
; Condition met, return true
(= 1 1)
; Condition not met, reset player actions and return false
(begin
(objects_detach (unit (player0)) rock)
)
)
1
)
(objects_attach (unit (player0)) "back_pack" rock "")
; Sleep until the player has disengaged, or been damaged
(sleep_until
(unit_has_weapon_readied (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon"))
(unit_has_weapon (unit (player0)) "objects\weapons\support_high\rocket_launcher\rocke t_launcher.weapon")
)
1
)
(objects_detach (unit (player0)) rock)
false)
1
)
)
(script dormant _stealth_timer_monitor
(sleep_until
(begin
; Sleep until the button has been pressed
(sleep_until
(if
; (and
; (>= (unit_get_shield (player0)) 1.0)
(player_action_test_vision_trigger)
; )
; Condition met, return true
(= 1 1)
; Condition not met, reset player actions and return false
(begin
(player_action_test_reset)
(= 1 0)
)
)
1
)
; Activate stealth
(cheat_active_camouflage_by_player 0 true)
(print "stealth engaged")
; Drain health
; (unit_set_maximum_vitality (player0) 50 0)
; (unit_set_current_vitality (player0) 50 0)
; (object_set_shield (player0) 0.0)
; Sleep until fully stealthed (right now, it's 3-4 seconds)
(sleep 15)
; Reset the test
(player_action_test_reset)
; Sleep until the player has disengaged, attacks, or been damaged
(sleep_until
(or
(player_action_test_vision_trigger)
(player_action_test_primary_trigger)
(player_action_test_grenade_trigger)
(player_action_test_melee)
)
1
(* 9 30)
)
; Disengage
(cheat_active_camouflage_by_player 0 false)
(print "stealth disengaged")
; Drain health
; (unit_set_maximum_vitality (player0) 30 70)
; (object_set_shield (player0) 0.0)
; Sleep for a second
(sleep 30)
; Reset the test
(player_action_test_reset)
; cooldown for 15 seconds
(sleep_until
(begin
(print "+")
false
)
30
(* 5 30)
)
; Return false to continue looping
false
)
1
)
)
(script static void activate_stealth_toggle_monitor
(sleep 1)
; (wake _stealth_toggle_monitor)
)
(script static void activate_stealth_timer_monitor
(sleep 1)
; (wake _stealth_timer_monitor)
)
;========== PLAYTEST SCRIPTS ==========;Delete this before shipping
(script static void playtest_mission
(if
(game_is_playtest)
(begin
(sleep 30)
(hud_set_training_text playtest_raisehand)
(hud_show_training_text 1)
(player_action_test_reset)
(sleep_until (player_action_test_accept) 1)
(hud_show_training_text 0)
(sleep 30)
)
)
)
Those are the scripts from zanzibar.
this is the interesting parts which would agree with what Garanas said...
; Globals
(global string data_mine_mission_segment "")
; Difficulty level scripts
(script static boolean difficulty_legendary
(= (game_difficulty_get) legendary)
)
(script static boolean difficulty_heroic
(= (game_difficulty_get) heroic)
)
(script static boolean difficulty_normal
(= (game_difficulty_get) normal)
)
; Cutscene skip hacks live again
; Yuck... at least I understand it now
(script static boolean cinematic_skip_start
(cinematic_skip_start_internal) ; Listen for the button which reverts (skips)
(game_save_cinematic_skip) ; Save the game state
(sleep_until (not (game_saving)) 1) ; Sleep until the game is done saving
(not (game_reverted)) ; Return whether or not the game has been reverted
)
(script static void cinematic_skip_stop
(cinematic_skip_stop_internal) ; Stop listening for the button
(if (not (game_reverted)) (game_revert)) ; If the player did not revert, do it for him
)
; Cinematic fade scripts
(script static void cinematic_fade_to_white
; Kill player control
(player_enable_input false)
(player_camera_control false)
; Fade out
(hud_cinematic_fade 0 0.5) ; pbertone 9/23
(cinematic_start) ; pbertone 9/23
(fade_out 1 1 1 30) ; pbertone - changed from 15 to 30 (9/23)
(sleep 30) ; pbertone - changed from 15 to 30 (9/23)
; Edit sound channels, other stuff here
; (cinematic_start)
(camera_control on)
Kornman00
July 5th, 2011, 03:26 AM
The data mining stuff has nothing to do with any of the things you guys are trying to accomplish. Not only that, but such debug functions aren't even present in the game.
Kirby_422
July 5th, 2011, 11:44 AM
Hes trying to accomplish something with it? And I kinda guessed about the debug after that test I did with all the dumping functions, with no files being made, nor it crashing when I ran the one that hs_doc insisted would get someone fired.
(reset_dsp_image)
if we ever need to use this someone is getting fired
I really wanted to run that code to see what was so horrible about it.. oh well.
Anyways, lets explain player identification stuff for in scripts:
We don't have anything yet to identify specific players preforming certain actions to call scripts on like HCE... There is a few methods we may be able to try to dealing with this, but none of them sound that good.. First method would be that when an action_test for melee happens, quickly toss bipeds infront of everyone and see whose dies. This effectively removes the ability to melee, aswell as may not be accurate as an explosion or vehicle could be about to hit someone during that time. Another method would be weapon readied, to see if they have some secondary weapon out (used only to identify when they want to activate a script) and the problem there is we cant forcibly change their weapon back over to their other one without reseting their ammo and such, so they have to know to do it on their own. Next is grenade count, replace grenades with script activation. Last I can think of at this moment is constantly attaching and detaching vehicles to the player, and if they enter that, activate a script.. problem there is that it makes it alot harder to pickup weapons or enter other vehicles then.
leorimolo
July 5th, 2011, 01:14 PM
Got it working!
(script startup cinematic_fade_to_white
; Kill player control
(player_enable_input false)
(player_camera_control false)
; Fade out
(cinematic_start) ; pbertone 9/23
(sleep 30) ; pbertone - changed from 15 to 30 (9/23)
; Edit sound channels, other stuff here
(cinematic_start)
(camera_control on)
(cinematic_outro_start)
(set cinematic_letterbox_style 1)
(camera_set_field_of_view 60 0)
(camera_set cam 1000) ;the 1000 is the time the camera takes to go from yourplayer to the point
)
Kirby_422
July 5th, 2011, 01:25 PM
Anyways, lets explain player identification stuff for in scripts:
We don't have anything yet to identify specific players preforming certain actions to call scripts on like HCE... There is a few methods we may be able to try to dealing with this, but none of them sound that good.. First method would be that when an action_test for melee happens, quickly toss bipeds infront of everyone and see whose dies. This effectively removes the ability to melee, aswell as may not be accurate as an explosion or vehicle could be about to hit someone during that time. Another method would be weapon readied, to see if they have some secondary weapon out (used only to identify when they want to activate a script) and the problem there is we cant forcibly change their weapon back over to their other one without reseting their ammo and such, so they have to know to do it on their own. Next is grenade count, replace grenades with script activation. Last I can think of at this moment is constantly attaching and detaching vehicles to the player, and if they enter that, activate a script.. problem there is that it makes it alot harder to pickup weapons or enter other vehicles then.
Ended up doing the bold one.
(sleep_until (player_action_test_rotate_weapons) 1)
(player_action_test_reset)
(sleep 10)
(if (unit_has_weapon_readied (player) "objects\weapons\melee\energy_blade\energy_blade")
(begin
<otherstuff>
))
(you need your player static script) This basically makes it so if you change to your other weapon, which in this example is energy sword, it activates the <otherstuff> Biggest problem here is that anytime anyone changes to their secondary weapon, if you have your activator weapon out, it will do your script (so if you dont want people using your commands, put it away) this seems like the overall best method.
and rider_ejection is removed in H2.
Kirby_422
July 6th, 2011, 04:00 PM
Bad news everyone! Your script sizes are severely crippled in H2! So, today making a test map, I tossed one of my HCE scripts over.. Saved the file, told tool to compile. Strangely enough, tool says its unmatched.. I knew this isn't true as it is used in HCE fine. I open the file again... it chopped 3/4ths of the script off. Try pasting again, click save.. I watch the scroll bar shrink instantly as I click save. You know where in guerilla, it lists source bytes? Scripts cannot exceed 4098 bytes, anything beyond that is deleted.
Today has probably been the most disappointing birthday ever (not just this, other things have happened too)
Kornman00
July 7th, 2011, 03:36 AM
In scenario_hs_source_file, you can have a total of 8 files, each of which cannot exceed 262144 bytes. That's a total of 2MB of source if you play your cards right. I'd hardly call that "crippled" (also, those same definitions are used in the scenario itself). The only real limiter is in the syntax nodes block, which can only have 36,864 elements. That's for all scripts.
Kirby_422
July 7th, 2011, 11:19 AM
What are you editing your scenario_hs_source_file with that it allows you that large?.. doing it in guerilla, I reach a cap at 4098, and it deletes anything beyond that.
Resinball
July 7th, 2011, 07:13 PM
You can throw up a sample of what you where considering too long and I'll see if it disappears in my Guerilla(s).
Can the scripts be edited directly INSIDE of the .scenario file?
Kirby_422
July 7th, 2011, 09:34 PM
(global boolean stillsearchering false)
(global short number 0)
(global short numberz 0)
(global short limit 30)
(global short p0time 0)
(global short p1time 0)
(global short p2time 0)
(global short p3time 0)
(global short p4time 0)
(global short p5time 0)
(global short p6time 0)
(global short p7time 0)
(global short p8time 0)
(global short p9time 0)
(global short p10time 0)
(global short p11time 0)
(global short p12time 0)
(global short p13time 0)
(global short p14time 0)
(global short p15time 0)
(global short p0charge 0)
(global short p1charge 0)
(global short p2charge 0)
(global short p3charge 0)
(global short p4charge 0)
(global short p5charge 0)
(global short p6charge 0)
(global short p7charge 0)
(global short p8charge 0)
(global short p9charge 0)
(global short p10charge 0)
(global short p11charge 0)
(global short p12charge 0)
(global short p13charge 0)
(global short p14charge 0)
(global short p15charge 0)
(script static "unit" player
(unit (list_get (players) NUMBER))
)
(script static "unit" playerz
(unit (list_get (players) NUMBERz))
)
(script static "void" effectsmall
(effect_new_on_object_marker "effects\custom\lock\discharge small" (playerz) "")
)
(script static "void" effectmedium
(effect_new_on_object_marker "effects\custom\lock\discharge medium" (playerz) "")
)
(script static "void" effectlarge
(effect_new_on_object_marker "effects\custom\lock\discharge large" (playerz) "")
)
(script static "boolean" seatcheck
(or (vehicle_test_seat alock0 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock1 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock2 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock3 "c_turret_ap_d" (playerz))
(vehicle_test_seat alock4 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock5 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock6 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock7 "c_turret_ap_d" (playerz))
(vehicle_test_seat alock8 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock9 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock10 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock11 "c_turret_ap_d" (playerz))
(vehicle_test_seat alock12 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock13 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock14 "c_turret_ap_d" (playerz)) (vehicle_test_seat alock15 "c_turret_ap_d" (playerz))
)
)
(script continuous lockz
(if (unit_has_weapon_readied (player) "objects\weapons\melee\energy_blade\energy_blade")
(begin
(set stillsearchering 1)
(if (= (vehicle_test_seat_list alock1 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock1 "")
(objects_detach (player) alock1)
(vehicle_load_magic alock1 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock2 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock2 "")
(objects_detach (player) alock2)
(vehicle_load_magic alock2 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock3 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock3 "")
(objects_detach (player) alock3)
(vehicle_load_magic alock3 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock4 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock4 "")
(objects_detach (player) alock4)
(vehicle_load_magic alock4 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock5 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock5 "")
(objects_detach (player) alock5)
(vehicle_load_magic alock5 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock6 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock6 "")
(objects_detach (player) alock6)
(vehicle_load_magic alock6 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock7 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock7 "")
(objects_detach (player) alock7)
(vehicle_load_magic alock7 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock8 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock8 "")
(objects_detach (player) alock8)
(vehicle_load_magic alock8 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock9 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock9 "")
(objects_detach (player) alock9)
(vehicle_load_magic alock9 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock10 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock10 "")
(objects_detach (player) alock10)
(vehicle_load_magic alock10 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock11 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock11 "")
(objects_detach (player) alock11)
(vehicle_load_magic alock11 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock12 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock12 "")
(objects_detach (player) alock12)
(vehicle_load_magic alock12 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock13 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock13 "")
(objects_detach (player) alock13)
(vehicle_load_magic alock13 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock14 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock14 "")
(objects_detach (player) alock14)
(vehicle_load_magic alock14 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock15 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock15 "")
(objects_detach (player) alock15)
(vehicle_load_magic alock15 "" (player))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list alock0 "c_turret_ap_d" (players)) 0)
(begin
(objects_attach (player) "body" alock0 "")
(objects_detach (player) alock0)
(vehicle_load_magic alock0 "" (player))
(set stillsearchering 0)))
)))) ))))))))))))))))))))))))))) ))
(if (< number 15) (set number (+ number 1)) (set number 0))
)
(script continuous removal
(if (= (vehicle_test_seat_list alock0 "c_turret_ap_d" (players)) 0) (object_teleport alock0 lockzflag))
(if (= (vehicle_test_seat_list alock1 "c_turret_ap_d" (players)) 0) (object_teleport alock1 lockzflag))
(if (= (vehicle_test_seat_list alock2 "c_turret_ap_d" (players)) 0) (object_teleport alock2 lockzflag))
(if (= (vehicle_test_seat_list alock3 "c_turret_ap_d" (players)) 0) (object_teleport alock3 lockzflag))
(if (= (vehicle_test_seat_list alock4 "c_turret_ap_d" (players)) 0) (object_teleport alock4 lockzflag))
(if (= (vehicle_test_seat_list alock5 "c_turret_ap_d" (players)) 0) (object_teleport alock5 lockzflag))
(if (= (vehicle_test_seat_list alock6 "c_turret_ap_d" (players)) 0) (object_teleport alock6 lockzflag))
(if (= (vehicle_test_seat_list alock7 "c_turret_ap_d" (players)) 0) (object_teleport alock7 lockzflag))
(if (= (vehicle_test_seat_list alock8 "c_turret_ap_d" (players)) 0) (object_teleport alock8 lockzflag))
(if (= (vehicle_test_seat_list alock9 "c_turret_ap_d" (players)) 0) (object_teleport alock9 lockzflag))
(if (= (vehicle_test_seat_list alock10 "c_turret_ap_d" (players)) 0) (object_teleport alock10 lockzflag))
(if (= (vehicle_test_seat_list alock11 "c_turret_ap_d" (players)) 0) (object_teleport alock11 lockzflag))
(if (= (vehicle_test_seat_list alock12 "c_turret_ap_d" (players)) 0) (object_teleport alock12 lockzflag))
(if (= (vehicle_test_seat_list alock13 "c_turret_ap_d" (players)) 0) (object_teleport alock13 lockzflag))
(if (= (vehicle_test_seat_list alock14 "c_turret_ap_d" (players)) 0) (object_teleport alock14 lockzflag))
(if (= (vehicle_test_seat_list alock15 "c_turret_ap_d" (players)) 0) (object_teleport alock15 lockzflag))
)
(script continuous GingaBishounen
(sleep 30)
(set numberz 0)
(if (seatcheck) (begin (set p0time (+ p0time 1)) (set p0charge (+ p0charge 1))) (begin (if (> p0time 0) (set p0time (- p0time 1)))
(if (> p0charge 3) (if (< p0charge 8) (effectsmall) (if (< p0charge 12) (effectmedium) (effectlarge) ))) (set p0charge 0) ))
(if (>= p0time limit) (unit_exit_vehicle (playerz)) )
(set numberz 1)
(if (seatcheck) (begin (set p1time (+ p1time 1)) (set p1charge (+ p1charge 1))) (begin (if (> p1time 0) (set p1time (- p1time 1)))
(if (> p1charge 3) (if (< p1charge 8) (effectsmall) (if (< p1charge 12) (effectmedium) (effectlarge) ))) (set p1charge 0) ))
(if (>= p1time limit) (unit_exit_vehicle (playerz)) )
(set numberz 2)
(if (seatcheck) (begin (set p2time (+ p2time 1)) (set p2charge (+ p2charge 1))) (begin (if (> p2time 0) (set p2time (- p2time 1)))
(if (> p2charge 3) (if (< p2charge 8) (effectsmall) (if (< p2charge 12) (effectmedium) (effectlarge) ))) (set p2charge 0) ))
(if (>= p2time limit) (unit_exit_vehicle (playerz)) )
(set numberz 3)
(if (seatcheck) (begin (set p3time (+ p3time 1)) (set p3charge (+ p3charge 1))) (begin (if (> p3time 0) (set p3time (- p3time 1)))
(if (> p3charge 3) (if (< p3charge 8) (effectsmall) (if (< p3charge 12) (effectmedium) (effectlarge) ))) (set p3charge 0) ))
(if (>= p3time limit) (unit_exit_vehicle (playerz)) )
(set numberz 4)
(if (seatcheck) (begin (set p4time (+ p4time 1)) (set p4charge (+ p4charge 1))) (begin (if (> p4time 0) (set p4time (- p4time 1)))
(if (> p4charge 3) (if (< p4charge 8) (effectsmall) (if (< p4charge 12) (effectmedium) (effectlarge) ))) (set p4charge 0) ))
(if (>= p4time limit) (unit_exit_vehicle (playerz)) )
(set numberz 5)
(if (seatcheck) (begin (set p5time (+ p5time 1)) (set p5charge (+ p5charge 1))) (begin (if (> p5time 0) (set p5time (- p5time 1)))
(if (> p5charge 3) (if (< p5charge 8) (effectsmall) (if (< p5charge 12) (effectmedium) (effectlarge) ))) (set p5charge 0) ))
(if (>= p5time limit) (unit_exit_vehicle (playerz)) )
(set numberz 6)
(if (seatcheck) (begin (set p6time (+ p6time 1)) (set p6charge (+ p6charge 1))) (begin (if (> p6time 0) (set p6time (- p6time 1)))
(if (> p6charge 3) (if (< p6charge 8) (effectsmall) (if (< p6charge 12) (effectmedium) (effectlarge) ))) (set p6charge 0) ))
(if (>= p6time limit) (unit_exit_vehicle (playerz)) )
(set numberz 7)
(if (seatcheck) (begin (set p7time (+ p7time 1)) (set p7charge (+ p7charge 1))) (begin (if (> p7time 0) (set p7time (- p7time 1)))
(if (> p7charge 3) (if (< p7charge 8) (effectsmall) (if (< p7charge 12) (effectmedium) (effectlarge) ))) (set p7charge 0) ))
(if (>= p7time limit) (unit_exit_vehicle (playerz)) )
(set numberz 8)
(if (seatcheck) (begin (set p8time (+ p8time 1)) (set p8charge (+ p8charge 1))) (begin (if (> p8time 0) (set p8time (- p8time 1)))
(if (> p8charge 3) (if (< p8charge 8) (effectsmall) (if (< p8charge 12) (effectmedium) (effectlarge) ))) (set p8charge 0) ))
(if (>= p8time limit) (unit_exit_vehicle (playerz)) )
(set numberz 9)
(if (seatcheck) (begin (set p9time (+ p9time 1)) (set p9charge (+ p9charge 1))) (begin (if (> p9time 0) (set p9time (- p9time 1)))
(if (> p9charge 3) (if (< p9charge 8) (effectsmall) (if (< p9charge 12) (effectmedium) (effectlarge) ))) (set p9charge 0) ))
(if (>= p9time limit) (unit_exit_vehicle (playerz)) )
(set numberz 10)
(if (seatcheck) (begin (set p10time (+ p10time 1)) (set p10charge (+ p10charge 1))) (begin (if (> p10time 0) (set p10time (- p10time 1)))
(if (> p10charge 3) (if (< p10charge 8) (effectsmall) (if (< p10charge 12) (effectmedium) (effectlarge) ))) (set p10charge 0) ))
(if (>= p10time limit) (unit_exit_vehicle (playerz)) )
(set numberz 11)
(if (seatcheck) (begin (set p11time (+ p11time 1)) (set p11charge (+ p11charge 1))) (begin (if (> p11time 0) (set p11time (- p11time 1)))
(if (> p11charge 3) (if (< p11charge 8) (effectsmall) (if (< p11charge 12) (effectmedium) (effectlarge) ))) (set p11charge 0) ))
(if (>= p11time limit) (unit_exit_vehicle (playerz)) )
(set numberz 12)
(if (seatcheck) (begin (set p12time (+ p12time 1)) (set p12charge (+ p12charge 1))) (begin (if (> p12time 0) (set p12time (- p12time 1)))
(if (> p12charge 3) (if (< p12charge 8) (effectsmall) (if (< p12charge 12) (effectmedium) (effectlarge) ))) (set p12charge 0) ))
(if (>= p12time limit) (unit_exit_vehicle (playerz)) )
(set numberz 13)
(if (seatcheck) (begin (set p13time (+ p13time 1)) (set p13charge (+ p13charge 1))) (begin (if (> p13time 0) (set p13time (- p13time 1)))
(if (> p13charge 3) (if (< p13charge 8) (effectsmall) (if (< p13charge 12) (effectmedium) (effectlarge) ))) (set p13charge 0) ))
(if (>= p13time limit) (unit_exit_vehicle (playerz)) )
(set numberz 14)
(if (seatcheck) (begin (set p14time (+ p14time 1)) (set p14charge (+ p14charge 1))) (begin (if (> p14time 0) (set p14time (- p14time 1)))
(if (> p14charge 3) (if (< p14charge 8) (effectsmall) (if (< p14charge 12) (effectmedium) (effectlarge) ))) (set p14charge 0) ))
(if (>= p14time limit) (unit_exit_vehicle (playerz)) )
(set numberz 15)
(if (seatcheck) (begin (set p15time (+ p15time 1)) (set p15charge (+ p15charge 1))) (begin (if (> p15time 0) (set p15time (- p15time 1)))
(if (> p15charge 3) (if (< p15charge 8) (effectsmall) (if (< p15charge 12) (effectmedium) (effectlarge) ))) (set p15charge 0) ))
(if (>= p15time limit) (unit_exit_vehicle (playerz)) )
)
Only about a 1/4 is added to the saved file.
Anyways, right now I'm trying to mess with texture cameras
(texture_camera_set_object_marker <object> <string_id> <real>)
make a shader, referance the texture_camera template
shaders\shader_templates\texture_camera\
This might be nice for remote survey cameras (like duke nukem 3d)
but since the script specifies where you want it from, and not the object you want to apply the camera too. All viewing things will have to be the same image at the same time. One problem though, is I doubt that script is applied to clients.. I'll figure it out tomorow if my new kitten is still to terrified to come out from under the bed.. if he does want to come out and be loved, then I'll be playing with him (thats mostly why I explained where to look for these things. incase im busy with him)
Why doesn't he love me? He liked me when I was picking him out at the SPCA today.. then I bring him home, and he sits under my bed, will occasionally come out for food, and then run if I move my arm towards him...
Resinball
July 7th, 2011, 11:30 PM
That script cuts off at this line:
(if (= stillsearchering 1) (begin (if (= (vehicleü5)
...but vehicleü5 does not exist in the original script. What is ü? An unrecognized charater?
-------
Remote cameras, with the viewer located inside of the Coag bases that can display the Rox spawn, would be a nice touch. Was wondering if the scope from the Sniper could be used for that purpose at one time. That will be a fun one to test out.
Kirby_422
July 13th, 2011, 08:14 PM
Guess you guys want those results on the texture camera, right? lol.
So, do exactly as I said (apply that shader_template, and then use the script) and that's all that is needed. Works nice for host, does nothing on clients (as to be expected with H2V's scripting setup)
And might as well ask this in all my script threads across different websites lol:
So, a week or so ago, me and a few others on a teamspeak server where talking about a gametype where instead of dying, you simply got locked up. I am wondering how many people would be interested in such a gametype (mainly because its alot more difficult to do this with h2v than HCE, and im a very lazy person)
I have started writing it out, and its been going fairly well. Only real issue at the moment is that when your tossed into your jail cell, it instantly respawns you instead *shrug* (no record in the game score of you dying either lol) I believe this issue was from players leaving the BSP from my earlier testing.
Before I do anymore work (or finish it) I would like to know what you think of it, and what features you'd want included. The script involves making all players deathless, and when their health is as empty as it can get being deathless, move them to a box. When someone flips a switch by the box, move them back to their spawn area. Depending on how many people are in the server, you get stuff appearing on your side for however many people are caught (currently, if 6 or less people are playing, first person to have their jail 3 filled, their team has a tank appear by their base. if you have more than that, jail 6 filled) This will make people want to save their people to prevent the other team for getting capture bonus'. I may also toss something in to reward you for freeing so many people if this is popular enough.
So, give me your feedback weather you'd actually play this, or what you want changed, etc. (also, I was lazy with what I have scripted and didnt incorperate players quiting the game into the system. All you who play online, how often do people rage quit in h2v?)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.