Home » Renegade Discussions » Mod Forum » :S Hostage Script help..
:S Hostage Script help.. [message #349332] |
Thu, 04 September 2008 16:46 |
|
halo2pac
Messages: 659 Registered: December 2006 Location: Near Cleveland, Ohio
Karma: 0
|
Colonel |
|
|
On level load (islands)
Vector3 host1pos;
host1pos.X = -41.0f;
host1pos.Y = -175.0f;
host1pos.Z = 4.0f;
Commands->Attach_Script(Commands->Create_Object("Civ_Resist_Male_v2a",host1pos),"z_Hostage","PokerTeam=1,Hostage_Team=1,Hostage_Health=100,Hostage_Shield=100,Health_Regen_Ammount=2,Rescue_Message=1000,Controller_ID=1010,HostageDead_Message=2020");
and i walk upto him as a gds and as a nod hes just a dude ...
No hp, and if u shoot him nothing happens...
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*
|
|
|
Re: :S Hostage Script help.. [message #349338 is a reply to message #349332] |
Thu, 04 September 2008 17:28 |
|
zunnie
Messages: 2959 Registered: September 2003 Location: Netherlands
Karma: 0
|
General (2 Stars) |
|
|
http://www.multiplayerforums.com/index.php?showtopic=5040&st=0
You should use the scripts in leveledit.
Use this dll in leveledit: http://www.game-maps.net/staff/zunnie/hostagemode/scripts344/
Use this dll on the server: http://www.game-maps.net/staff/zunnie/hostagemode/ssgm202/
If you insist on using the scripts.dll to create the hostages you should also have it create the hostage controller and get the ID of that controller object.
You should use it like this then:
Commands->Attach_Script(Commands->Create_Object("Civ_Resist_Male_v2a",host1pos), "z_Hostage","1,0,100,100,2,1000,1010,2020");
Note though that the ControllerID is 1010 in the above script attached, this should be the ID of the object that has the z_Hostage_Controller script attached to it.
[Updated on: Thu, 04 September 2008 17:29] Report message to a moderator
|
|
|
|
Re: :S Hostage Script help.. [message #349745 is a reply to message #349332] |
Sun, 07 September 2008 11:05 |
|
halo2pac
Messages: 659 Registered: December 2006 Location: Near Cleveland, Ohio
Karma: 0
|
Colonel |
|
|
Ok i tried....
if (stricmp(Data->CurrMap,"C&C_Islands.mix") == 0) {
//Controller Hover Craft
Vector3 hov;
hov.X = -167.77f;
hov.Y = 28.30f;
hov.Z = -2.36f;
Commands->Attach_Script(Commands->Create_Object("GDI_Hovercraft",hov),"z_Hostage_Controller","1000,2020,4,4,1");
//Rescue Zone
Vector3 rescueboxplace;
rescueboxplace.X = -156.66f;
rescueboxplace.Y = 28.24f;
rescueboxplace.Z = 0.46f;
Vector3 rescuezoneposSizes;
rescuezoneposSizes.X = 5.0f;
rescuezoneposSizes.Y = 5.0f;
rescuezoneposSizes.Z = 5.0f;
OBBoxClass Box;
Box.Center = rescueboxplace;
Box.Extent = rescuezoneposSizes;
GameObject *Zone = Create_Zone("Script_Zone_All",Box);
Commands->Attach_Script(Zone,"z_Hostage_Rescue_Zone","1,civ_lab_tech_01,Farmer,civ_lab_tech_03,Nun,Priest,1000");
//Hostages
Vector3 host1pos;
//host1pos.X = -55.36f;
//host1pos.Y = -203.13f;
//host1pos.Z = 0.0f;
host1pos.X = -153.00f;
host1pos.Y = 45.f;
host1pos.Z = 0.0f;
GameObject *hosty1 = Commands->Create_Object("civ_lab_tech_01",host1pos);
char *params = new char[128];
sprintf(params,"1,1,100,10,2,1000,%d,2020",Commands->Get_ID(hosty1));
Commands->Attach_Script(hosty1,"z_Hostage",params);
}
Level loads, displays how many rescues.. but when u take the hostage to the zone .. CRASH!
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*
|
|
|
|
|
|
|
Re: :S Hostage Script help.. [message #350724 is a reply to message #349332] |
Sat, 13 September 2008 12:09 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
I would assume it crashes because you set the controller ID to the ID of the hostage, instead of the controller.
sprintf(params,"1,1,100,10,2,1000,%d,2020",Commands->Get_ID(hosty1));
Should be using Get_ID on the hovercraft controller object, which requires you to change the code that creates the hovercraft controller object so that you have the GameObject* for that object stored in a variable.
But, since I didn't make, and have never used, these scripts, I couldn't say for sure, I am just guessing based on the comment about using the ID of the controller.
|
|
|
Goto Forum:
Current Time: Thu Dec 12 05:15:38 MST 2024
Total time taken to generate the page: 0.00922 seconds
|