ID:272852
 
How to make someone Co-host if it can be done??
do you mean co host same server???
or host another server??
if host another server you can just give world exe to another guy and make him host it for u
In response to Jakb2k7
same server
Inuyashaisbest wrote:
> mob/var
> hostserver=0
> cohost=0
> mob/proc/ocheck()
> if(src.key=="Your_Key")
> src.hostserver=1
> return
> if(src.key=="Thier_Key")
> src.cohost=1
> return
>

Its a cheap unsafe way of basically giving co host lol

I think you missed the point.

Also, just on a note, in your redundant code, return is redundant as you're not returning anything in that proc.
In response to Mysame
return isn't used exclusively to return a specific value, but also for its other effect - stopping the proc. You're right the 2nd return there is redundant, but the 1st isn't at all. The return is effectively used in a similar manner to an 'else' statement; it prevents going further in the proc if the if() was satisfied.
Related: For example, in code like this:
proc/MyProc(val)
if(val)
return 1
else
return 0

... the 'else' is highly redundant. It's great for readability, but on the code execution, in this case, it will make no difference.
In response to Kaioken
know this is not what topic is about but can someone give me code for how to make NPC s and dont point me to DM guide because I wos ther but I culdnt find it.
In response to Jedien Yuki
"How to make someone Co-host if it can be done??"

This is about making a person "co host", not NPCs >_> For NPCs, there's plenty of resources on creating basic NPCs and basic AI for basic NPCs.

As for your co-host question, there isn't a "co host" feature in any of the BYOND software. What you're asking about is a hypothetical necessity (as I call it, though the terminology is probably off :\ ).

Only you can "make" someone else a "co host", and that doesn't even require any programming on anyone's part. This concept is as easy as just writing the person's name on the hub <_< (Co-Host: Account_Name_Here). My idea of a "co host" is someone who will continue hosting my game after the main host's connection dies, virtually creating a non-ending world. What would be required of this, is the co-host having a copy of the host files for your game as well as your main host. However, the players' savefiles will not be transfered from the main host's computer to your co-host's computer in the event that the main host's connection does die. That would have to happen between the main host and the co-host on their own.
In response to Spunky_Girl
plz tell me wher to find that for NPCs
In response to Jedien Yuki
Try searching, genius.
In response to Spunky_Girl
thx big help
In response to Jedien Yuki
Jedien Yuki wrote:
know this is not what topic is about but can someone give me code for how to make NPC s and dont point me to DM guide because I wos ther but I culdnt find it.

Why do people expect the DM Guide to be a great list of code-examples that fit every category with the description "lul copypaste in ur game nd it works kk" instead of a big learning book to comprehend the language so you can do about anything yourself?

.<;
In response to Mysame
Because they think programming games is very easy; like how it is easy to go from a rip to an "original" game.

<font size="1">Which is impossible.</font>