
grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 06:15 PM
Msg. 1 of 36
So i think i'm bothering Kirby to much asking so many questions. So i'm making this thread to the public so i can learn some things.
First: I remember hearing awhile ago that you could attach a trigger_volume to an object. Is this true and if so may i have the command?
Second: In seconds, roughly, how long is a Tick? I have seen some commands like (sleep 30) and i read, in the scripting bible, that that was 30 ticks. So i was wondering how long in seconds (or hundredths of a second) a Tick was.
Third: The command
(Unit_set_enterable_by_player true)
I tried using this on a biped thinking it would allow me to walk up, press "E", and enter the seat i added. Needles to say, it didn't work. So how would i be able to do what i was trying to?
Please keep in mind that i know very little about scripting and am trying to learn (long story short, please use laymens terms :P Lol.)
|
|
|

Pepzee
Joined: Sep 9, 2010
Retired Halo Modder
|
Posted: Apr 22, 2012 06:24 PM
Msg. 2 of 36
First: I'm unsure on this one, I've never had to attach a trigger before, sorry.
Second: 30 ticks 1 second. If you do the math: 1/30= .03 seconds per tick.
Third: I'm really not sure what your entire problem with is is but the only thing I see is that you didn't specify the vehicle name. The full command:
(unit_set_enterable_by_player <unit> <boolean>)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 06:29 PM
Msg. 3 of 36
Yeah, sorry. the script command i used was (unit_set_enterable_by_player camped true) the script compiled perfectly, and when i walked up and pressed "E" i get no result. Also it doesn't pop up with the option to press "E" either, if that helps.
|
|
|

Pepzee
Joined: Sep 9, 2010
Retired Halo Modder
|
Posted: Apr 22, 2012 06:35 PM
Msg. 4 of 36
Quote: --- Original message by: grunt_eater Yeah, sorry. the script command i used was (unit_set_enterable_by_player camped true) the script compiled perfectly, and when i walked up and pressed "E" i get no result. Also it doesn't pop up with the option to press "E" either, if that helps. Something tells me it's a seat problem then. You should be able to hop in your vehicle without that command anyway. Technically the player is able to enter everything unless it doesn't have a seat, so that command is just allowing something that already is. That's my experience with it anyway.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 06:44 PM
Msg. 5 of 36
That's why i said it was a biped, you can't enter a bipeds seat normally. So i set this command in to the named biped so you could enter it, i'll check to see if there's a seat real quick.
|
|
|

Pepzee
Joined: Sep 9, 2010
Retired Halo Modder
|
Posted: Apr 22, 2012 07:03 PM
Msg. 6 of 36
Quote: --- Original message by: grunt_eater That's why i said it was a biped, you can't enter a bipeds seat normally. So i set this command in to the named biped so you could enter it, i'll check to see if there's a seat real quick. Sorry I misread that then. I'm not sure if you can use that command for a biped though, I think it's only for the player. Try (vehicle_load_magic <unit> <string> <object_list>) Unit is the vehicle name. String is the seat name. Object_list is the biped name I believe. Hopefully that works, if you have any more problems let me know.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 07:11 PM
Msg. 7 of 36
Yeah, that does work, and i have used it before, that's kind of why i asked if you could attach a trigger_volume to an object. Because then i would be able to attach a trigger_volume to a biped and set it so that if i'm in that trigger_volume it loads me into the bipeds seat and finishes the rest of the script. Then i'd make it so it only loaded you if you did an action test while in the trigger_volume.
But now i need to know how to attach a trigger volume to a biped...
Edit: didn't find any script commands in the halo scripting bible. Edited by grunt_eater on Apr 22, 2012 at 07:12 PM
|
|
|

Pepzee
Joined: Sep 9, 2010
Retired Halo Modder
|
Posted: Apr 22, 2012 07:18 PM
Msg. 8 of 36
To be honest I don't know then. Sorry. Also GRUNTS said he knew the answer to your first question, here's what he said: Quote: --- Original message by: GRUNTS u cant attach trigger volumes to objects. but there is a way to make portable trigger volumes. u attach a biped to the object that u want a trigger volume on, and u give that biped a specified range of view and field of view. this biped will act as ur trigger volume. then, u attach another biped of the same type to the object that u want the trigger volume to pick up. this way, you can test whether the 2 bipeds are in range of each other's sight, thus acting as a fake portable trigger volume
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 07:53 PM
Msg. 9 of 36
Okay, New question. Would it be possible to make just one biped and set it so that if that biped can see the player (players)) 0) it would load you into the seat of a named vehicle?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 22, 2012 08:01 PM
Msg. 10 of 36
.. So I go do other things for a few hours, and you decide to make a thread to ask what I hadn't responded to yet?.. a bit impatient lol (could of also sent another PM telling me to of not bothered with responded then.. I responded to the PMs before reading the forums, rawr)
Also, using one biped would be bad. Its looking angles... ..../ .../ ../ ./ / \ .\ ..\ ...\ ....\ The further away, the larger a field it is. The point of having two is so that you only care about that small space where they overlap, giving you size control.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 08:21 PM
Msg. 11 of 36
Sorry, Kirby, i just figured since i always ask you you'd gotten kind of annoyed with my nooblyness :P i didn't think you were ignoring me, i just thought you disliked noobs constantly asking you stupid questions like everyone else.
But on topic, wouldn't that work like if you were 50 feet back? like this
......................../-\ ......................./---\ ....................../-----\ ...................../-------\ ..................../---------\ .................../-----------\ ................../-------------\ ................./---------------\ ................/-----------------\ .............../-------------------\ ............../---------------------\ ............./-----------------------\ ............/-------------------------\ .........../---------------------------\ ........../-----------------------------\ ........./-------------------------------\ ......../---------------------------------\ ......./-----------------------------------\ ....../-------------------------------------\ ...../---------------------------------------\ ..../-----------------------------------------\ .../-------------------------------------------\ ../---------------------------------------------\ .|----------------------------------------------| ..\---------------------------------------------/ ...\-------------------------------------------/ ....\-----------------------------------------/ .....\---------------------------------------/ ......\-------------------------------------/ .......\-----------------------------------/ ........\---------------------------------/ .........\-------------------------------/ ..........\-----------------------------/ ...........\---------------------------/ ............\-------------------------/ .............\-----------------------/ ..............\---------------------/ ...............\-------------------/ ................\-----------------/ .................\---------------/ ..................\-------------/ ...................\-----------/ ....................\---------/ .....................\-------/ ......................\-----/ .......................\---/ ........................\-/
Dashes = empty space
But yeah, if you were like 50\100 feet back it would still work. And you'd be forced to jump space to the vehicle. Also is it a biped or an AI that the script checks if it can see? because if it's an AI then you could just set it so it would only see like 3 feet in front of it and only withing a certain parameter, like set it's FOV to something really small so it could only see you if you were within like 3 feet of space in front of it, not off to the left or right. Edited by grunt_eater on Apr 22, 2012 at 08:26 PM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 22, 2012 08:32 PM
Msg. 12 of 36
if you did it with one biped, it would get infinitely big. If you did two, each alone may be infinitely big, but the area they both share is a small controlled area in a cone prism or whatever its called; <>
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 08:43 PM
Msg. 13 of 36
But if it was done with an AI then you could set it's sight range to something like 1 world unit so you'd have to be right up on it for it to see you.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 22, 2012 08:47 PM
Msg. 14 of 36
you cant control world units, you can only control vision angle, which with any distance gets bigger and bigger. (objects_can_see_object <object_list> <object> <real>) returns true if any of the specified units are looking within the specified number of degrees of the object. hs_doc entry. That's why you need a second AI; to put on the other side to prevent the distance from being infinitely long and large.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 22, 2012 08:52 PM
Msg. 15 of 36
Maybe i should be more specific. In the "actor" tag of an "actor_variant" you can set how many world units away it's max vision goes.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 22, 2012 08:55 PM
Msg. 16 of 36
Look at the parameters, it doesn't take an AI in, it takes ANY object. You just use a AI so you have higher control where its looking with the ai_look_at_object command (So that when you have two, you can force them to look at each other to make a perfect volume) (ai_look_at_object <unit> <object>) tells an actor to look at an object until further notice
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 23, 2012 10:24 AM
Msg. 17 of 36
Okay, that's where i was getting lost, I thought you were saying put one AI on the biped and another on your player, and if the AI can see each other then it does the rest of the script. Now i understand, so my next question is do i just make two bipeds and a script that attaches them to two markers of the biped, and then attach an AI to each biped? Or how am i supposed to go about doing this?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 23, 2012 10:42 AM
Msg. 18 of 36
(script continuous AIAttaching (ai_attach YourBiped1 YourEncounter) (ai_attach YourBiped2 YourEncounter) (ai_look_at_object YourBiped1 YourBiped2) (ai_look_at_object YourBiped2 YourBiped1) (objects_attach YourItem "Marker1" YourBiped1 "") (objects_attach YourItem "Marker2" YourBiped2 "") (sleep 10) ) When testing, I'd normally do both objects_can_see_object for each the AI, but you shouldn't actually need to since it takes a object list in (if thats easier for you to understand/use than repetition), it should work with just (objects_can_see_object (ai_actors YourEncounter) ItemYourLookingFor 45)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 23, 2012 11:09 AM
Msg. 19 of 36
Oookay, Lol. My next question. The (unit_set_enterable_by_player mybiped (player0) true) command Isn't working. I have added a seat to my biped and used this command on it, but no results. did i just misunderstand the command or what? Could you please tell me why this isn't working\what i did wrong and need to do to make it work? Edit: Okay, so a script something like this? (script continuous ai (ai_attach ai1 assassin_check) (ai_attach ai2 assassin_check) (ai_look_at_object ai1 ai2) (ai_look_at_object ai2 ai1) (objects_attach assassinbot "AI1" ai1 "body") (objects_attach assassinbot "AI2" ai2 "body") (if (Objects_can_see_object (ai_actors assassin_check) (player0) 45) (vehicle_load_magic assassinbot "driver" (player0)) )
What this script is supposed to do is load you into the bipeds seat if these two ai can see you. i need to know if it will work, and if not then what i need to do to make it work. Please and thank you ^_^ for all of the help. Edit2: Another question, what is an argument? Edit3:...Oh...em...Eff...Gee...I actually made a script that works. I've finally made a script that works, and does what i want it to. After a little rebuilding of the script above, i have actually gotten it working. Here's the new one, that works quite well. (script continuous ai (ai_attach ai1 assassin_check) (ai_attach ai2 assassin_check) (ai_look_at_object ai1 ai2) (ai_look_at_object ai2 ai1) (objects_attach assassinbot "AI1" ai1 "body") (objects_attach assassinbot "AI2" ai2 "body") (if (objects_can_see_object (ai_actors assassin_check) (unit (list_get (players) 0)) 45) (vehicle_load_magic assassinbot "driver" (unit (list_get (players) 0)) )) )
The only problem i have with it is the AI load me even when i'm not every close to the biped, just in their side vision. But i'm sure i'll be able to fix it in time, lol. Now all that's left to do is set it so that it to (unit_kill_silent assassinbot) (sleep 45) (vehicle_unload assassinbot "driver") These are the on;y three things i need to put in and i'll be done. And, Kirby, i have a question. Is the 45 in (Objects_can see_object (ai_actors assassin_check) (unit (list_get (players) 0)) 45) the field of view for the ai? Also, you were talking about doing an (objects_can_see_object actors_assassin_check) check for each of them, how would i do that? Edited by grunt_eater on Apr 23, 2012 at 08:50 PM
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 23, 2012 08:55 PM
Msg. 20 of 36
the 45 is the angle. in the top, you can add (global real angleDebug 45) and write angleDebug instead of the one 45, then use devmode with 'set angleDebug DIFFERENTNUMBERHERE' and test it ingame (so you don't have to recompile or anything) its a real number, so it can have decimal places, so you can try 5.5 degrees if you want, etc. play with it until its good, and then just use that number, etc.
For using the multiple commands when the condition is met, instead of just putting vehicle_load_magic, put (begin (vehicle_load_magic blah "blah" blah) (something_else) (something_else) (etc) ) The begin will encapsulate all those commands so the if preforms them correctly. Using that, you can have your kill, etc. (Also.. you really shouldn't be killing the unit the player is sitting in.. your experiments will explain this to you without me saying)
Another thing, for getting you out of the biped, use (unit_enter_vehicle (unit (list_get (players) 0)) SOMEVEHICLE "driver"); I normally use that to exit vehicles, and in my tries its never actually put me in the vehicle, just kicked me out of the biped lol. I normally use an action_test_rest (which is needed for my uses, although I don't think they would be for yours. If you aren't prompted to enter vehicles ever again after exiting the biped, you'll need it)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 23, 2012 09:26 PM
Msg. 21 of 36
Thank you very much, sir. Another problem. My script is executing the kill command before i enter the seat. Should i set up the kill command in a static script and then have the other script call it when the entering command is executed? and if so what type of static script should i use.
And on more thing. How would i go about making it so that when you enter the sight of the AI it gives you the option of pressing "E" instead of just automatically loading you. Like instead of just loading you, you have to press "E" first to enter it.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 23, 2012 10:36 PM
Msg. 22 of 36
have a vehicle there, if you enter the vehicle, instead toss you on the biped. Use the AI to instead see if the vehicle is out of sight and attach - detach the vehicle closer (if your constantly attaching and detaching, the E option will be messed with as well (While its attached, it will be considered the same team as what its attached too, as well as halo not liking you entering child objects. You have to hold E a second for it to react. Constant attach - detach wouldn't give you the time frame to enter it.))
Are you doing the kill in a (begin <blah>) statement, or some other way? If your doing a static script, have it a void (since your not returning anything) So, (script static void SCRIPTNAME CONTENTS) But it wont act any differently than using the (begin <stuff>), it will have the exact same reaction times.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 24, 2012 12:22 AM
Msg. 23 of 36
I had it after everything in the begin ended, I was hoping that it wouldn't be activated until you entered the seat :P the reason i wanted to make it a static script was because i was hoping that that way i could make it so that the action of you entering the seat would call the static script into action, so that when you entered the seat the static script would be activated and kill the biped( but not before you entered the seat).
Also another question :P is there a way to make AI check to see if you're meleeing?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 25, 2012 10:39 PM
Msg. 24 of 36
read your last thread on melee checking, I talked about that there. I guess the animation to damage the object can be by AI seeing the object rather than killing it, but that's more effort for the same effect.
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 26, 2012 04:35 PM
Msg. 25 of 36
Okay, thanks. Lol, another question. I remember awhile back you made a multi-player map where AI would sync online. i remember that you used vehicles and Object_attache Object_detached them to bipeds to make them sync. My question is, why didn't you use weapons or something of less tag space?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 26, 2012 05:03 PM
Msg. 26 of 36
you can use any syncing item you want, its just vehicles are more natural, you don't have to worry about them de-spawning, without physics they wont move without your command, etc. Yes, you can make guns float, etc, but whatever (Also, bipeds without AI sync positions(That's why clients can see host's bipeds in squishing scripts), so you can use bipeds as well. you really could use whatever you want)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 26, 2012 05:16 PM
Msg. 27 of 36
Lol, i thought that bipeds wouldn't sync online. but good to know, thanks kirby. What command do i use to make a script check to see if the player has entered a vehicle? I've got this so far (script dormant unload_kill (begine (if (unit (list_get (players) 0)) ("command to check if you're in the seat") true) (sleep 90) (vehicle_unload assassinbot "driver") (unit_kill_silent assassinbot)) ) Also http://www.youtube.com/watch?v=dVy06bOUZaECould you do something like this in halo? like would it build up your momentum and transfer it when you are teleported. Edited by grunt_eater on Apr 26, 2012 at 08:49 PM
|
|
|

Muscl3r
Joined: May 22, 2010
dont pray 4 easy lives...pray to be STRONGER MEN
|
Posted: Apr 27, 2012 03:48 PM
Msg. 28 of 36
(vehicle_test_seat_list assassinbot "driver" (players))
There ya go.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 27, 2012 03:58 PM
Msg. 29 of 36
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 27, 2012 04:38 PM
Msg. 30 of 36
i saw that command but didn't know how to use it Something like this? (script dormant unload_kill (vehicle_test_seat asssassinbot "driver" (players)) (vehicle_unload assassinbot "driver" (unit_kill_silent assassinbot) ) Would that work? i mean you'd think you'd have to make it check and then set it so that if it's true then it does the rest of the script.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 27, 2012 05:00 PM
Msg. 31 of 36
(vehicle_test_seat_list <vehicle> <string> <object_list>) tests whether the named seat has an object in the object list It returns true if a member of the object list is in the seat, false otherwise (Also, I believe it is the seat label, not the marker that its looking for (eg, w-driver, etc)) So you'd need a (if (vehicle_test_blahblah) (begin (blah) (blah)))
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 27, 2012 05:55 PM
Msg. 32 of 36
(script dormant unload_kill (if (vehicle_test_seat_list assassinbot "W-driver" (unit (list_get (players) 0))) (begin (sleep 90) (vehicle_unload assassinbot "driver") (sleep 90) (unit_kill_silent assassinbot)) )) ) This is what i have, but when i compile it, sapien tells me this "This is not an object of type vehicle_name.:assassinbot "W-driver" (unit (list_get (players) 0)))" And stops compiling my script.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 27, 2012 06:36 PM
Msg. 33 of 36
Quote: --- Original message by: grunt_eater "This is not an object of type vehicle_name.:assassinbot "W-driver" (unit (list_get (players) 0)))" Quote: --- Original message by: kirby_422(vehicle_test_seat_list <vehicle> <string> <object_list>) tests whether the named seat has an object in the object list Anyways, the way to know if a unit is in a biped is whether you directly put it in there or not (since you can only get something in a biped by script anyways)
|
|
|

grunt_eater
Joined: Jan 26, 2011
Everything except biped rigging.
|
Posted: Apr 28, 2012 12:27 PM
Msg. 34 of 36
So, then, how would i go about making the script check if the Bipeds seat is occupied?
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Apr 28, 2012 01:54 PM
Msg. 35 of 36
Quote: --- Original message by: kirby_422 Anyways, the way to know if a unit is in a biped is whether you directly put it in there or not (since you can only get something in a biped by script anyways) (vehicle_driver <unit>) returns the driver of a vehicle You can try using that although it isn't really meant for that. idk if (= <blah> <blah>) would work on comparing units, but you could try *shrug* if it doesn't, compare health, shields, and grenade count, and even weapons if you must (although you know the biped is in there or not purely based on whether you put it there or not *sigh*)
|
|
|