Hi!
I have 3 COGs that test and assign stuff.
I'm making a coop level where you can choose to be the hero, or badguy, and when you die, you are respawned to your respective HQs.
Good guys get a flag so that when dead, they return to the respawn chambers at the good HQ. Will make bad guys MUCH later.
Now this teleports Special People to their respective HQs, within the same community. Basically, server owners. I've set 3 of these COGs where the room(int)s are 2, 3 & 4. The 3 owners are:
ME! The server starter.
Hawk, the story teller and Vice boss (under me)
Danne, the weapons expert (weapon vender, together with misc).
Now of course, the owners need keys so that they can... No, not leave the crew stranded while they watch them being slawtered... The HQs are actually homes to the owners, and so there are these private doors like, bathrooms, kitchens, wardrobe, stuff...
The problem being is that when I go to one of these places, I don't get keys, nor do we respawn in the appropriate places. We go back to the start where we choose sides...
Oh, and one more thing... Could you make sure that these COGs will work on Local Players, but the teleport is shown to all players.
/Edward
I have 3 COGs that test and assign stuff.
I'm making a coop level where you can choose to be the hero, or badguy, and when you die, you are respawned to your respective HQs.
Code:
# Enter this place and you are assigned that species. (Human) # # By Edward symbols message entered sector thisplace end # code entered: If(GetSenderRef()!=thisplace) return; SetThingFlags(GetSourceRef(),536870912*20); return; end
Good guys get a flag so that when dead, they return to the respawn chambers at the good HQ. Will make bad guys MUCH later.
Code:
# Thing Teleport # # By Edward symbols message activated thing place thing switch sound teleport int room template woosh end # code activated: If(GetSenderRef()!=switch) return; PlaySoundThing(teleport,GetSourceRef(),1,-1,10,0x0); CreateThing(woosh,GetSourceRef()); TeleportThing(GetSourceRef(),place); CreateThing(woosh,GetSourceRef()); PlaySoundThing(teleport,GetSourceRef(),1,-1,10,0x0); SetThingFlags(GetSourceRef(),536870912*room); return; end
Now this teleports Special People to their respective HQs, within the same community. Basically, server owners. I've set 3 of these COGs where the room(int)s are 2, 3 & 4. The 3 owners are:
ME! The server starter.
Hawk, the story teller and Vice boss (under me)
Danne, the weapons expert (weapon vender, together with misc).
Code:
# Test owners. If there is one, give hime the apropriet key! # # By Edward flags=0x240 symbols message startup message pulse message newplayer thing owner1 thing owner2 thing hrespawn0 thing hrespawn1 thing hrespawn2 thing hrespawn3 thing hrespawn4 thing hrespawn5 thing hrespawn6 thing hrespawn7 thing hrespawn8 thing arespawn0 thing arespawn1 thing arespawn2 thing arespawn3 thing arespawn4 thing arespawn5 thing arespawn6 thing arespawn7 thing arespawn8 end # code startup: SetPulse(1); return; pulse: if(GetThingFlags(GetLocalPlayerThing())==536870912*2) { SetInvAvailable(GetLocalPlayerThing(),46,1); } else if(GetThingFlags(GetLocalPlayerThing())==536870912*3) { SetInvAvailable(GetLocalPlayerThing(),48,1); } else if(GetThingFlags(GetLocalPlayerThing())==536870912*4) { SetInvAvailable(GetLocalPlayerThing(),46,1); SetInvAvailable(GetLocalPlayerThing(),48,1); } return; newplayer: If(GetThingFlags(GetSenderRef())==536870912*2) { TeleportThing(GetSenderRef(),hrespawn0[rand()*8]); } else If(GetThingFlags(GetSenderRef())==536870912*20) { TeleportThing(GetSenderRef(),hrespawn0[rand()*8]); } else If(GetThingFlags(GetSenderRef())==536870912*30) { TeleportThing(GetSenderRef(),arespawn0[rand()*8]); } else If(GetThingFlags(GetSenderRef())==536870912*3) { TeleportThing(GetSenderRef(),owner2); } else If(GetThingFlags(GetSenderRef())==536870912*4) { TeleportThing(GetSenderRef(),owner1); } return; end
Now of course, the owners need keys so that they can... No, not leave the crew stranded while they watch them being slawtered... The HQs are actually homes to the owners, and so there are these private doors like, bathrooms, kitchens, wardrobe, stuff...
The problem being is that when I go to one of these places, I don't get keys, nor do we respawn in the appropriate places. We go back to the start where we choose sides...
Oh, and one more thing... Could you make sure that these COGs will work on Local Players, but the teleport is shown to all players.
/Edward