Home » Renegade Discussions » Mod Forum » Coopmap Ihavenoname
|
|
Re: Coopmap Ihavenoname [message #447813 is a reply to message #447809] |
Mon, 23 May 2011 05:54 |
|
renalpha
Messages: 1000 Registered: January 2007 Location: Holland - Zuid-Holland - ...
Karma: 0
|
General (1 Star) |
|
|
tiberiumfield in center
-
Attachment: coopmap2.png
(Size: 199.46KB, Downloaded 300 times)
Aircraftkiller wrote on Fri, 18 February 2011 23:50 | I figured some people will still go LOLOLOL STARVING CATS LOOOOLZ UR A FAG or some dumb shit like that. Thanks for not disappointing!
|
[Updated on: Mon, 23 May 2011 05:54] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Coopmap Ihavenoname [message #447832 is a reply to message #447809] |
Mon, 23 May 2011 08:07 |
|
zunnie
Messages: 2959 Registered: September 2003 Location: Netherlands
Karma: 0
|
General (2 Stars) |
|
|
I've got an idea how to do that with a teleporter, simular way i did it for MCV Escort map in APB, except this will have more checkpoints.
Edit: Somethig like this will work:
void z_jret_CheckpointControl::Created(GameObject *obj)
{
Commands->Enable_HUD_Pokable_Indicator(obj, true);
PokerGuy = 0;
AllowPoke = true;
Check1Locked = true;
Check2Locked = true;
Check3Locked = true;
Check4Locked = true;
Check5Locked = true;
Check6Locked = true;
}
void z_jret_CheckpointControl::Poked(GameObject *obj, GameObject *poker)
{
if (AllowPoke)
{
Commands->Enable_HUD_Pokable_Indicator(obj, false);
AllowPoke = false;
PokerGuy = poker;
if (Check1Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,101);//teleport the guy
}
else if (Check2Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,102);//teleport the guy
}
else if (Check3Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,103);//teleport the guy
}
else if (Check4Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,104);//teleport the guy
}
else if (Check5Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,105);//teleport the guy
}
else if (Check6Locked == false)
{
Commands->Start_Timer(obj,this,0.0f,106);//teleport the guy
}
else
{
Send_Message(104,234,40,"Access Denied");
Commands->Create_2D_WAV_Sound("accessdenied.wav");
}
Commands->Start_Timer(obj,this,2.0f,107);//allowpoke true
}
}
void z_jret_CheckpointControl::Timer_Expired(GameObject *obj, int number)
{
if (number == 101)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp1id1 = 1234;
int cp1id2 = 1234;
int cp1id3 = 1234;
GameObject *gotoObjectcp1id1 = Commands->Find_Object(cp1id1);
GameObject *gotoObjectcp1id2 = Commands->Find_Object(cp1id2);
GameObject *gotoObjectcp1id3 = Commands->Find_Object(cp1id3);
Vector3 gotoLocationcp1id1 = Commands->Get_Position(gotoObjectcp1id1);
Vector3 gotoLocationcp1id2 = Commands->Get_Position(gotoObjectcp1id2);
Vector3 gotoLocationcp1id3 = Commands->Get_Position(gotoObjectcp1id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp1id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp1id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp1id3);
}
}
else if (number == 102)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp2id1 = 1234;
int cp2id2 = 1234;
int cp2id3 = 1234;
GameObject *gotoObjectcp2id1 = Commands->Find_Object(cp2id1);
GameObject *gotoObjectcp2id2 = Commands->Find_Object(cp2id2);
GameObject *gotoObjectcp2id3 = Commands->Find_Object(cp2id3);
Vector3 gotoLocationcp2id1 = Commands->Get_Position(gotoObjectcp2id1);
Vector3 gotoLocationcp2id2 = Commands->Get_Position(gotoObjectcp2id2);
Vector3 gotoLocationcp2id3 = Commands->Get_Position(gotoObjectcp2id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp2id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp2id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp2id3);
}
}
else if (number == 103)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp3id1 = 1234;
int cp3id2 = 1234;
int cp3id3 = 1234;
GameObject *gotoObjectcp3id1 = Commands->Find_Object(cp3id1);
GameObject *gotoObjectcp3id2 = Commands->Find_Object(cp3id2);
GameObject *gotoObjectcp3id3 = Commands->Find_Object(cp3id3);
Vector3 gotoLocationcp3id1 = Commands->Get_Position(gotoObjectcp3id1);
Vector3 gotoLocationcp3id2 = Commands->Get_Position(gotoObjectcp3id2);
Vector3 gotoLocationcp3id3 = Commands->Get_Position(gotoObjectcp3id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp3id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp3id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp3id3);
}
}
else if (number == 104)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp4id1 = 1234;
int cp4id2 = 1234;
int cp4id3 = 1234;
GameObject *gotoObjectcp4id1 = Commands->Find_Object(cp4id1);
GameObject *gotoObjectcp4id2 = Commands->Find_Object(cp4id2);
GameObject *gotoObjectcp4id3 = Commands->Find_Object(cp4id3);
Vector3 gotoLocationcp4id1 = Commands->Get_Position(gotoObjectcp4id1);
Vector3 gotoLocationcp4id2 = Commands->Get_Position(gotoObjectcp4id2);
Vector3 gotoLocationcp4id3 = Commands->Get_Position(gotoObjectcp4id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp4id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp4id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp4id3);
}
}
else if (number == 105)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp5id1 = 1234;
int cp5id2 = 1234;
int cp5id3 = 1234;
GameObject *gotoObjectcp5id1 = Commands->Find_Object(cp5id1);
GameObject *gotoObjectcp5id2 = Commands->Find_Object(cp5id2);
GameObject *gotoObjectcp5id3 = Commands->Find_Object(cp5id3);
Vector3 gotoLocationcp5id1 = Commands->Get_Position(gotoObjectcp5id1);
Vector3 gotoLocationcp5id2 = Commands->Get_Position(gotoObjectcp5id2);
Vector3 gotoLocationcp5id3 = Commands->Get_Position(gotoObjectcp5id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp5id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp5id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp5id3);
}
}
else if (number == 106)
{
Send_Message_Player(PokerGuy,104,234,40,"Access Granted");
Create_2D_WAV_Sound_Player(PokerGuy,"accessgranted.wav");
int random = Commands->Get_Random_Int(1,3);
int cp6id1 = 1234;
int cp6id2 = 1234;
int cp6id3 = 1234;
GameObject *gotoObjectcp6id1 = Commands->Find_Object(cp6id1);
GameObject *gotoObjectcp6id2 = Commands->Find_Object(cp6id2);
GameObject *gotoObjectcp6id3 = Commands->Find_Object(cp6id3);
Vector3 gotoLocationcp6id1 = Commands->Get_Position(gotoObjectcp6id1);
Vector3 gotoLocationcp6id2 = Commands->Get_Position(gotoObjectcp6id2);
Vector3 gotoLocationcp6id3 = Commands->Get_Position(gotoObjectcp6id3);
if (random == 1)
{
Commands->Set_Position(PokerGuy,gotoLocationcp6id1);
}
else if (random == 2)
{
Commands->Set_Position(PokerGuy,gotoLocationcp6id2);
}
else if (random == 3)
{
Commands->Set_Position(PokerGuy,gotoLocationcp6id3);
}
}
else if (number == 107)
{
AllowPoke = true;
Commands->Enable_HUD_Pokable_Indicator(obj, true);
}
}
void z_jret_CheckpointControl::Custom(GameObject *obj, int message, int param, GameObject *sender)
{
if (message == 1000)
{
if (param == 1)
{
Check1Locked = false;
Check2Locked = true;
Check3Locked = true;
Check4Locked = true;
Check5Locked = true;
Check6Locked = true;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint One is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint One is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint One is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
else if (param == 2)
{
Check1Locked = true;
Check2Locked = false;
Check3Locked = true;
Check4Locked = true;
Check5Locked = true;
Check6Locked = true;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint Two is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Two is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Two is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
else if (param == 3)
{
Check1Locked = true;
Check2Locked = true;
Check3Locked = false;
Check4Locked = true;
Check5Locked = true;
Check6Locked = true;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint Three is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Three is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Three is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
else if (param == 4)
{
Check1Locked = true;
Check2Locked = true;
Check3Locked = true;
Check4Locked = false;
Check5Locked = true;
Check6Locked = true;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint Four is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Four is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Four is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
else if (param == 5)
{
Check1Locked = true;
Check2Locked = true;
Check3Locked = true;
Check4Locked = true;
Check5Locked = false;
Check6Locked = true;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint Five is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Five is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Five is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
else if (param == 3)
{
Check1Locked = true;
Check2Locked = true;
Check3Locked = true;
Check4Locked = true;
Check5Locked = true;
Check6Locked = false;
Send_Message(255,204,0,"Access Granted");
Send_Message(255,204,0,"Checkpoint Six is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Six is now UNLOCKED.");
Send_Message(255,204,0,"Checkpoint Six is now UNLOCKED.");
Commands->Create_2D_WAV_Sound("accessgranted.wav");
}
}
}
ScriptRegistrant<z_jret_CheckpointControl> z_jret_CheckpointControl_Registrant("z_jret_CheckpointControl","");
[Updated on: Mon, 23 May 2011 08:22] Report message to a moderator
|
|
|
Re: Coopmap Ihavenoname [message #447835 is a reply to message #447809] |
Mon, 23 May 2011 08:55 |
iRANian
Messages: 4311 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Couldn't you just write a script that destroys all spawners when it receives a custom and creates new spawners objects at the positions from the scripts params? Then you could use a bunch of scripts that send customs and write your own if you need more complex stuff.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
|
|
Re: Coopmap Ihavenoname [message #447886 is a reply to message #447809] |
Mon, 23 May 2011 23:51 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
You can't add or remove spawners because they are part of the static level information. If zunnie has done it the way I would do it, he has a single set of spawners in a script zone which is setup to teleport you to one of the 'active' start points.
(Not had time to read through his code snippets yet)
[Updated on: Mon, 23 May 2011 23:52] Report message to a moderator
|
|
|
|
|
Re: Coopmap Ihavenoname [message #447918 is a reply to message #447809] |
Tue, 24 May 2011 15:50 |
iRANian
Messages: 4311 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
The layout is starting to shape up pretty well. I could program up some code to do the checkpoint stuff and some scripts to make the amount of bots spawned be determined by player count, if you'd like to.
That's a nice way to work around it, danpaul. I was thinking about doing some 'dynamic' spawner logic for a few things, sadly it'll require maps designed for it then. :/
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Tue, 24 May 2011 15:51] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jan 10 11:50:34 MST 2025
Total time taken to generate the page: 0.01268 seconds
|