
chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:02 PM
Msg. 1 of 52
1. Place a vehicle (warthog works best) in Sapien in a in-accessible location (preferably a "sync" room). Name it "host_hog". Make sure the vehicle is set NOT to spawn automatically on any gametypes. 2. Make a trigger volume that just barley fits around the vehicle. Name it "host_vol". 3. Make a cutscene camera flag in the room. Name it "host_cam". 4. Use this script: (global boolean is_host false) (global boolean is_dedicated false) (script startup host_detection ;Script by =CE= Chris (if (= (list_count (players) ) 0) (set is_dedicated true) ) (object_pvs_set_camera host_cam) (object_create_anew host_hog) (sleep 30) (if (= (volume_test_object host_vol host_hog) 1) (set is_host true) ) ) 5. ??? 6. Profit! Explanation: This script works because the host spawns a warthog and it sits there. When a client joins they create another warthog that bounces off the server's warthog and falls outside the trigger volume. The PVS camera point is there so the game doesn't optimize the physics out and stop it from working when there are no players near it. This script even works on the race gametype! (Unlike most other host detection scripts.) The dedicated server detection is simply counting the number of players on the map during the first tick of the game, if there are none it means it's a dedicated server. I had this script sitting around for awhile and though maybe other people could use it for their maps. This is a simplified version of the script used on Yoyorast Island V2. Edited by chrisk123999 on Apr 24, 2011 at 09:04 PMEdited by chrisk123999 on Apr 24, 2011 at 09:13 PMEdited by chrisk123999 on Oct 27, 2011 at 04:26 PMEdited by chrisk123999 on Apr 15, 2015 at 04:24 PM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:08 PM
Msg. 2 of 52
I've yet to see a map with a good host detection script that works on race. (Excluding Yoyorast Island V2)
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Apr 24, 2011 09:12 PM
Msg. 3 of 52
This is perfect for my scripting needs. Thanks.
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Apr 24, 2011 09:14 PM
Msg. 4 of 52
It's important for my needs because it checks for a dedicated server.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:15 PM
Msg. 5 of 52
It's the same basic theory. That one is just the reverse. They're both just as simple. Plus mine works when there are no players near it, that one doesn't have a pvs in the script so won't work when used in a sync room. Edited by chrisk123999 on Apr 24, 2011 at 09:17 PM
|
|
|

SlappyThePirate
Joined: Aug 24, 2009
You are irritating, I'll release nothing
|
Posted: Apr 24, 2011 09:20 PM
Msg. 6 of 52
Secret plan is secret... L28
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:20 PM
Msg. 7 of 52
Mine is all purpose and works no matter what situation your in. I could delete the dedicated server detection if I really wanted to. Yours lacks a pvs camera, try yours when it's used in a far away sync room. PVS will fubar yours if the player is nowhere near it. And PVS will effect if differently on a dedicated server when there are no players joining right away. Edited by chrisk123999 on Apr 24, 2011 at 09:21 PM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:22 PM
Msg. 8 of 52
What happens on a dedicated server when no player joins right away? The PVS camera is just a failsafe anyway.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:25 PM
Msg. 9 of 52
I could take the PVS camera point out and mine would probably work too. Doesn't matter anyway, we have the same basic theory in the scripts.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:28 PM
Msg. 10 of 52
Mine is a public all purpose release. Unless you released yours too?
Yes, it's been awhile. Just go hi-speed again. Edited by chrisk123999 on Apr 24, 2011 at 09:29 PM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 24, 2011 09:30 PM
Msg. 11 of 52
Does your script work on race?
|
|
|

cyboryxmen
Joined: Nov 7, 2010
--CG artist-- New mission. Refuse this Mission!
|
Posted: Apr 25, 2011 05:55 AM
Msg. 12 of 52
Can't you just set player 0 as the host? All you really need is the dedicated check script. -Zekilk Edited by cyboryxmen on Apr 25, 2011 at 05:59 AM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 25, 2011 04:08 PM
Msg. 13 of 52
Clients have no way of knowing whether they're player 0. Plus on a dedicated server, player 0 isn't the host.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 25, 2011 04:49 PM
Msg. 14 of 52
There is nothing wrong with that script except poor formatting.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 25, 2011 05:06 PM
Msg. 15 of 52
It's just a global, not that hard to fix, overall the script still works.
|
|
|

strangebrew
Joined: Oct 15, 2010
user gone
|
Posted: Apr 25, 2011 05:26 PM
Msg. 16 of 52
Quote: --- Original message by: Pablo283023 I was still correct brah. U mirin'? lodex so how many accounts you got here then? chris ignore lodex/pablo283023 for the past while he has gone out of his way to get others banned with his alt accounts.now he's just trying hard to create an argument with a similar name to an old member. he will lead to your thread being locked. avwim
|
|
|

strangebrew
Joined: Oct 15, 2010
user gone
|
Posted: Apr 25, 2011 05:55 PM
Msg. 17 of 52
what did you correct? all you did was quote.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 25, 2011 05:57 PM
Msg. 18 of 52
Don't feed the troll.
|
|
|

strangebrew
Joined: Oct 15, 2010
user gone
|
Posted: Apr 25, 2011 05:59 PM
Msg. 19 of 52
true.
nice work on the script btw. i could use this.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Apr 25, 2011 09:35 PM
Msg. 20 of 52
Now that I look at your script again, I don't think it would work on race.
|
|
|

tylerp14
Joined: Oct 12, 2010
Ohai der...
|
Posted: May 1, 2011 12:41 AM
Msg. 21 of 52
Cool, having some errors but cool. Edited by tylerp14 on May 1, 2011 at 05:56 AM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: May 1, 2011 12:53 PM
Msg. 22 of 52
What errors?
|
|
|

Nickster5000
Joined: Dec 11, 2010
|
Posted: May 3, 2011 10:03 PM
Msg. 23 of 52
Uhhh, i have a question.
Cool script in all, but i dont understand the purpose / why you would use it. Can someone answer for me? Lol, thanks
|
|
|

UBE Chief
Joined: Sep 28, 2009
Raising the bar, one kill at a time.
|
Posted: May 3, 2011 10:10 PM
Msg. 24 of 52
This can be used in a variety of ways. I would use it to detect who's the host so that my vehicle respawn script would function properly (as in, clients see one vehicle instead of two).
Anyone else got other examples? :p
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: May 3, 2011 10:32 PM
Msg. 25 of 52
Can't think of anything off the top of my head. Making proper kill boxes and teleporting players.
|
|
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Oct 24, 2011 09:22 PM
Msg. 26 of 52
Bump. I've tried this and it seems to work, but I'm still having problems with the race gametype. Here's my script - you'll notice that it has your 'perfect host detection' script, along with a vehicle spawning script. (global boolean is_host false) (global boolean is_dedicated false)
(script startup host_detection (sleep 5) (if (= (list_count (players) ) 0) (set is_dedicated true)) (object_pvs_set_camera host_cam) (object_create_anew host_hog) (object_create_anew hog1) (object_create_anew hog2) (object_create_anew car1) (object_create_anew car2) (sleep 30) (if (= (volume_test_object host_vol host_hog) 1) (set is_host true)) )
(script continuous client (if (= is_host true) (begin (if (= (volume_test_object syncbox hog1) 1) (object_teleport hog1 vehdest1)) (if (= (volume_test_object syncbox hog2) 1) (object_teleport hog2 vehdest2)) (if (= (volume_test_object syncbox car1) 1) (object_teleport car1 vehdest3)) (if (= (volume_test_object syncbox car2) 1) (object_teleport car2 vehdest4)) ))) It works in that the non-global vehicles (the red cars) spawn even on race mode, but when the vehicles respawn they respawn at the first race waypoint marker! Video.. http://www.youtube.com/watch?v=mglKcUS9TtgNOTE: This video was made when I had more vehicles in the script - The script is not spawning more vehicles than it should. Just respawning them in the wrong place :/ What am I doing wrong? Can anyone help me fix this? Edited by Black Crypt on Oct 24, 2011 at 10:31 PM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Oct 24, 2011 09:26 PM
Msg. 27 of 52
I'm not sure. Halo has a really funny way of doing race vehicle spawns.
|
|
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Oct 24, 2011 09:28 PM
Msg. 28 of 52
Wow, quick response.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Oct 24, 2011 09:31 PM
Msg. 29 of 52
I have it set to e-mail me when someone posts in this topic. And my Google Chrome is set to inform me upon new e-mails. :)
I'm sure someone around here knows the proper way to get your own vehicles to spawn properly in Race. I know we got it working in Yoyo v2 somehow.
|
|
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Oct 24, 2011 09:41 PM
Msg. 30 of 52
I have the entire yoyov2 script via halo script extractor and I've been examining it, my problem is that I don't know what objects were placed to test certain conditions.
I'm pretty much exhausted on this. Another project hits the skids :( Edited by Black Crypt on Oct 24, 2011 at 09:42 PM
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Oct 24, 2011 09:46 PM
Msg. 31 of 52
I can't remember, but I think you just have a big room with a trigger volume set to teleport the vehicles out to the correct spot on the map once they respawn in there.
|
|
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Oct 24, 2011 10:18 PM
Msg. 32 of 52
Yup.
I have a trigger volume (syncbox) that contains 2 hogs (hog1, hog2 - in globals) and 2 cars (car1, car2 - not in globals). In the map I have 4 flags (vehdest1 - 4).
The vehicles spawn in the correct places initially, but respawn at race waypoint 0.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Oct 25, 2011 07:42 AM
Msg. 33 of 52
Try placing a race vehicle spawn in the sync room.
|
|
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Oct 25, 2011 10:03 PM
Msg. 34 of 52
I've worked out that this is replicated on slayer too - so not a race related problem.
|
|
|

chrisk123999
Joined: Aug 10, 2008
=CE= Chris [Captain] [=]
|
Posted: Oct 25, 2011 10:05 PM
Msg. 35 of 52
Then your doing something wrong.
|
|
|