So what is exactly is the problem with SAPP? Same issues as before? Random connection errors still? Does anyone have a contact for Termy?
Everyone on team Yoyorast: Thanks. Anxiously awaiting the release.![]()
ok for the Pop up menu as soon as the game starts. you don't even need to have the Host /non Host menu to pop up for client and servers to give you options to control the server from within the game
uhhhhhhh... its a basic script. made by i believe rec0 and kornman00...
it checks the vehicle health comparing it with the number 0. as mp vehicles don't have health as such it will either return 0 or nil/neg1
-1 means the vehicle dosn't exist. <0 means it exists
if you do something like this. and forgive me my scripting is a little rusty after 2 years
(global Boolean Isserver false) ;sets the global variable to false from the starting up of the server
then
(script startup isserver
(if unitgethealth(warthog1)==0
(set(Isserver, True)) :then part of the statement
(set(Isserver, False))
) :else part of the statement. more on those later
)
then you just use the global variavle in a continuous script for all your controls providing that the Isserver global is true
(script continuous serverstuff
(if Isserver
(server-iey things go here)
)
)
well its something like that anyway. when i get back into it ill be alittle less rusty with it all XD.. so that just means you don't need to have 1 extra menu to tell the client that you are either a client or server
oh!!! before i forget
the reason you use a vehicle to return the health is because.
vehicles only really exist on the servers. not on the clients
if you do something like
unitgethealth on a vehicle with the same name as something in sapien. on a server. it will return a number = to or greater than 0. depending on weather the vehicle has health or not.
if you run that on a client it will return -1 because it dosn't exist on the client.
I'm going to set aside the fact that your sentences don't make much sense, for instance, "Stick a biped down". To my knowledge, there is no script function that will force a biped to shoot another biped. And even if there was, I don't understood how your idea would detect which person was host.
When you place a biped on a MP map the client will get double bipeds. The server and the client one. When you kill the client one and you check it's health it will be 0 then turn to -1 after the body disappears. The client biped also shows up on top of server biped making it's head higher up. Now if you have a script activate an effect that shoots a sniper projectile at the client biped's head, it will kill that one, but not the server biped.
Edit: Just tested it, you would have to kill the server biped and not the client biped and it would work.
Last edited by chrisk123999; September 8th, 2009 at 09:44 PM.
http://www.xfire.com/video/1353ff/
Works perfect.
When the client joins and the script on the client shoots nothing will happen since the client can't make a projectile because it's not the host.
Script:
Edit this to run on map startup.Code:(global boolean is_host false) (script dormant host_check (begin (effect_new "chris\effects\sniped" shoot) (sleep 30) (if (<= (unit_get_health host_check) 0) (set is_host true) ) ) )
Place a flag like this:
Make sure the shot hits the head of the bottom biped.
Name it shoot (or something else if you changed the script).
Use this effect: http://dl.getdropbox.com/u/1455347/H.../sniped.effect
Basically, this works because the client can't kill it's own biped.
Last edited by chrisk123999; September 8th, 2009 at 11:10 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks