Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Ingame Error?
Ingame Error? [message #273263] Sat, 14 July 2007 20:14 Go to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
im testing my code to teleport me to the single flar
class testChatCommand : public ChatCommandClass {
	 void Triggered(int ID,const TokenClass &Text,int ChatType) {
                if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
		GameObject *obj = Get_GameObj_By_Player_Name(Text[1].c_str());
                Change_Character(obj,"GDI_MP");
		Commands->Attach_Script(obj,"JFW_Permanent_No_Falling_Damage",false);
		Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI",false);
		Commands->Attach_Script(obj,"JFW_Permanent_No_Falling_Damage",false);
SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares");
int Rand = Commands->Get_Random_Int(0,List.Count());
GameObject *RandObj = List[Rand];
Commands->Set_Position(obj,Commands->Get_Position(RandObj));;
Vector3 Pos = Commands->Get_Position(obj);
			Pos.Z += 0.710;
				}
	}
};

NOTE i added the Vector3 Pos = Commands->Get_Position(obj);
Pos.Z += 0.710;
myself to maybe fix it

well besides that the error i get is this ingame is this
http://i72.photobucket.com/albums/i172/Tanner2007/84a8fb48.png
and this is how it is in lvl and idk how to fix it iv tryed all i know
http://i72.photobucket.com/albums/i172/Tanner2007/ab1c256f.jpg
Re: Ingame Error? [message #273265 is a reply to message #273263] Sat, 14 July 2007 20:45 Go to previous messageGo to next message
Tankkiller is currently offline  Tankkiller
Messages: 192
Registered: February 2006
Location: Oklahoma, OK!
Karma: 0
Recruit
Um, you put a smoke grenade, just select it and rasie it.

http://i186.photobucket.com/albums/x78/a-10_man/sig.jpg

BYE, BYE FLAME TANK!!!

[Updated on: Sat, 14 July 2007 20:46]

Report message to a moderator

Re: Ingame Error? [message #273273 is a reply to message #273263] Sat, 14 July 2007 21:17 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
i have trued riasing it to the roof and yet stil did whats in the first screenshot
Re: Ingame Error? [message #273284 is a reply to message #273263] Sat, 14 July 2007 22:40 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
It is falling through the large_blockers.
Re: Ingame Error? [message #273285 is a reply to message #273263] Sat, 14 July 2007 22:50 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
o so objects fall thru the boxes but chars dont?
what can i use to stop them from falling?

[Updated on: Sat, 14 July 2007 22:58]

Report message to a moderator

Re: Ingame Error? [message #273299 is a reply to message #273263] Sun, 15 July 2007 01:31 Go to previous messageGo to next message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
Are you sure they have enabled collision properties?


PS. Looking at the code, dont continuasly open the file and read from it everytime the command is called on because it will lag the server and will crash it sometimes. Or atleast thats what happned to me.

[Updated on: Sun, 15 July 2007 01:42]

Report message to a moderator

Re: Ingame Error? [message #273334 is a reply to message #273299] Sun, 15 July 2007 05:56 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
a100 wrote on Sun, 15 July 2007 04:31

Are you sure they have enabled collision properties?


PS. Looking at the code, dont continuasly open the file and read from it everytime the command is called on because it will lag the server and will crash it sometimes. Or atleast thats what happned to me.


Opening/Closing a file won't crash your server. I always did that until I wrote my "cache ini class".


class testChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		 if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
			 GameObject *obj = Get_GameObj(ID); // Gets GameObj using Player ID
			 Change_Character(obj, "GDI_MP");
			 Commands->Attach_Script(obj, "JFW_Permanent_No_Falling_Damage", ""); // Prevent obj from recieving falling damage
			 Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI", ""); // Give GDI Auto Rifle

			 SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares"); // Get a list of all the flares (MAKE SURE THE TEAM IS SET TO 2! WILL NOT WORK OTHERWISE)
			 int id = Commands->Get_Random_Int(0, List.Count()-1) // C++ always starts at 0, not 1 therefore -1 :)
			 GameObject *RandObj = List[id]; // Pick the GameObj
			 Commands->Set_Position(obj, Commands->Get_Position(RandObj)); // Move the position of your GameObj to the flare!
		 }
		 else {
			 char Bad[256];
			 sprintf(Bad, "ppage %d You do not have access to this command", ID);
			 Console_Input(Bad);
		 }
	}
}



Let all your wishes be granted except one, so you will still have something to strieve for.
Re: Ingame Error? [message #273440 is a reply to message #273263] Sun, 15 July 2007 14:51 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
so if the guys not on list he gets that page? can i adapt that on my other codes?

[Updated on: Sun, 15 July 2007 15:15]

Report message to a moderator

Re: Ingame Error? [message #273454 is a reply to message #273299] Sun, 15 July 2007 15:44 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
a100 wrote on Sun, 15 July 2007 03:31

Are you sure they have enabled collision properties?




also how i do that
Re: Ingame Error? [message #273544 is a reply to message #273263] Sun, 15 July 2007 23:36 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
or can i use a small blocker to do that?
Re: Ingame Error? [message #273561 is a reply to message #273299] Mon, 16 July 2007 02:00 Go to previous messageGo to next message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
Quote:

Opening/Closing a file won't crash your server. I always did that until I wrote my "cache ini class".


Well it lags your server alot. But it may just be me.


@Joe It's in leveledit. Click mod object and it should be somewhere there.

[Updated on: Mon, 16 July 2007 02:02]

Report message to a moderator

Re: Ingame Error? [message #273564 is a reply to message #273263] Mon, 16 July 2007 02:23 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
i cant find it do i have to change anything for the settings to pop up?

also im getting some weird errors ingame like when killed a light it gives 2 shells and repair them u get 4 tanks back and idk if its scripts or lvl i may just screw the pluging and go to the basic source files or somthing Razz but idk why this error keeps happening
Re: Ingame Error? [message #273587 is a reply to message #273263] Mon, 16 July 2007 04:48 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
I thought that Renegade had an engine call for collisions too, something like (but not sure):

Commands->Enable_Collisions(GameObj);


a100: Sounds like something is malformed or you have leaks.


Let all your wishes be granted except one, so you will still have something to strieve for.
Re: Ingame Error? [message #273631 is a reply to message #273263] Mon, 16 July 2007 09:37 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
Sorry, but I would have liked not to double post but, I'm sorry joe but I cannot read your private messages. They are blocked for me for an unknown reason.

Let all your wishes be granted except one, so you will still have something to strieve for.
Re: Ingame Error? [message #273676 is a reply to message #273587] Mon, 16 July 2007 13:40 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
[quobut what i was trying to say in the code u posted above i cant use that ON another player i tryed a while to do it myself but got errors for like 2 hours and its a codde u use on another player Wink

[Updated on: Mon, 16 July 2007 14:07]

Report message to a moderator

Re: Ingame Error? [message #273749 is a reply to message #273263] Tue, 17 July 2007 00:55 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
What errors did you get?

Let all your wishes be granted except one, so you will still have something to strieve for.
Re: Ingame Error? [message #273750 is a reply to message #273749] Tue, 17 July 2007 00:57 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
dead6re wrote on Tue, 17 July 2007 09:55

What errors did you get?



well im trying to get the command to work on a player like do the code and command on THEM and them get the ppage but i got stupid errors
Re: Ingame Error? [message #273843 is a reply to message #273263] Tue, 17 July 2007 10:42 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
What code do you have?

Let all your wishes be granted except one, so you will still have something to strieve for.
Re: Ingame Error? [message #273847 is a reply to message #273843] Tue, 17 July 2007 10:47 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
dead6re wrote on Tue, 17 July 2007 18:42

What code do you have?


i tryed to make it so u can use the command on another player but failed

class testChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		 if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
			 GameObject *obj = Get_GameObj(ID); // Gets GameObj using Player ID
			 Change_Character(obj, "GDI_MP");
			 Commands->Attach_Script(obj, "JFW_Permanent_No_Falling_Damage", ""); // Prevent obj from recieving falling damage
			 Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI", ""); // Give GDI Auto Rifle

			 SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares"); // Get a list of all the flares (MAKE SURE THE TEAM IS SET TO 2! WILL NOT WORK OTHERWISE)
			 int id = Commands->Get_Random_Int(0, List.Count()-1) // C++ always starts at 0, not 1 therefore -1 :)
			 GameObject *RandObj = List[id]; // Pick the GameObj
			 Commands->Set_Position(obj, Commands->Get_Position(RandObj)); // Move the position of your GameObj to the flare!
		 }
		 else {
			 char Bad[256];
			 sprintf(Bad, "ppage %d You do not have access to this command", ID);
			 Console_Input(Bad);
		 }
	}
}
Re: Ingame Error? [message #273956 is a reply to message #273263] Wed, 18 July 2007 00:11 Go to previous messageGo to next message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma: 0
Colonel
Oh sorry, My code was to act on yourself.

class testChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		 if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
			 Get_GameObj_By_Player_Name(Text[1].c_str()); // Gets GameObj using Player Name
			 Change_Character(obj, "GDI_MP");
			 Commands->Attach_Script(obj, "JFW_Permanent_No_Falling_Damage", ""); // Prevent obj from recieving falling damage
			 Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI", ""); // Give GDI Auto Rifle

			 SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares"); // Get a list of all the flares (MAKE SURE THE TEAM IS SET TO 2! WILL NOT WORK OTHERWISE)
			 int id = Commands->Get_Random_Int(0, List.Count()-1) // C++ always starts at 0, not 1 therefore -1 :)
			 GameObject *RandObj = List[id]; // Pick the GameObj
			 Commands->Set_Position(obj, Commands->Get_Position(RandObj)); // Move the position of your GameObj to the flare!
		 }
		 else {
			 char Bad[256];
			 sprintf(Bad, "ppage %d You do not have access to this command", ID);
			 Console_Input(Bad);
		 }
	}
}


Let all your wishes be granted except one, so you will still have something to strieve for.

[Updated on: Wed, 18 July 2007 00:11]

Report message to a moderator

Re: Ingame Error? [message #273970 is a reply to message #273263] Wed, 18 July 2007 01:05 Go to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
ty i had somthing like this when i tryed but had bunch of fucked up parts :S
Previous Topic: Help me plz!!(me n00b)
Next Topic: Cinematics help!
Goto Forum:
  


Current Time: Fri Dec 20 22:30:57 MST 2024

Total time taken to generate the page: 0.01183 seconds