Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Script Request  () 1 Vote
Re: Script Request [message #330772 is a reply to message #330103] Fri, 16 May 2008 12:06 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)
can u tell me why this wont work?

class greenChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
Commands->Set_Screen_Fade_Color(0.0f,255.0f,0.0f,3.5f);
}
};

ChatCommandRegistrant<greenChatCommand> greenChatCommandReg("!green",CHATTYPE_ALL,0,GAMEMODE_ALL);


heres how i try to learn from

typedef void (*_Set_Screen_Fade_Color_Player) (GameObject *obj,float red,float green,float blue,float transition);


im guessing it may make shit green like iv seen servers turn the sky green and red and blue
Re: Script Request [message #330778 is a reply to message #330103] Fri, 16 May 2008 13:57 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Well GameObject* obj should be a valid game object, and your just giving it a float with the value 0.0, which will either be translated as NULL by the function and fail safely, or will cause Renegade to crash due to trying to access an invalid pointer.


Assuming Int ID refers to the player ID you should be able to use something like GetPlayerByID ( ID ) to get the GameObject* to pass to the function. The function name might be slightly different to that, this is just off the top of my head.




EDIT: Wait, nvm, you not even using that first parameter for some reason, so I don't think you have the right function definition there...


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 16 May 2008 14:00]

Report message to a moderator

Re: Script Request [message #330780 is a reply to message #330778] Fri, 16 May 2008 14:07 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)
danpaul88 wrote on Fri, 16 May 2008 13:57




EDIT: Wait, nvm, you not even using that first parameter for some reason, so I don't think you have the right function definition there...

then how i fix it?
Re: Script Request [message #330952 is a reply to message #330103] Sun, 18 May 2008 00:46 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 a new question i need an answer to please...
when i do a chat hook i can have an agt gun attached to my characters bone but i want to be able to make an object lets say a tank via chat hook and hook a object to it...the problem is a model or tnak does not have a bone to attach it to so how can i attach a gun or objects to somethign i created via chathook

[Updated on: Sun, 18 May 2008 01:14]

Report message to a moderator

Re: Script Request [message #330960 is a reply to message #330103] Sun, 18 May 2008 02:48 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Tanks do have bones.


Re: Script Request [message #330961 is a reply to message #330960] Sun, 18 May 2008 02: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)
reborn wrote on Sun, 18 May 2008 02:48

Tanks do have bones.

where can i find the names of the bones in which tanks?
Re: Script Request [message #330964 is a reply to message #330961] Sun, 18 May 2008 03:00 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
SSnipe wrote on Sun, 18 May 2008 05:57

reborn wrote on Sun, 18 May 2008 02:48

Tanks do have bones.

where can i find the names of the bones in which tanks?

Open the .w3d file up in w3d viewer.



Re: Script Request [message #330965 is a reply to message #330964] Sun, 18 May 2008 03:06 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)
reborn wrote on Sun, 18 May 2008 03:00

SSnipe wrote on Sun, 18 May 2008 05:57

reborn wrote on Sun, 18 May 2008 02:48

Tanks do have bones.

where can i find the names of the bones in which tanks?

Open the .w3d file up in w3d viewer.

does it also apply for models? like the agt model found inside buildings.ini?
Re: Script Request [message #330968 is a reply to message #330103] Sun, 18 May 2008 03:12 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Not sure, try it dude... You lazy ass Razz


Re: Script Request [message #330970 is a reply to message #330968] Sun, 18 May 2008 03:14 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)
reborn wrote on Sun, 18 May 2008 03:12

Not sure, try it dude... You lazy ass Razz

hehe not lazy just tired of spending hours on something you guys do in 2 minutes Wink
Re: Script Request [message #330974 is a reply to message #330970] Sun, 18 May 2008 03:29 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
SSnipe wrote on Sun, 18 May 2008 06:14

reborn wrote on Sun, 18 May 2008 03:12

Not sure, try it dude... You lazy ass Razz

hehe not lazy just tired of spending hours on something you guys do in 2 minutes Wink



Two minutes, hehe.
Dude, I am like reading the next page of the same book you're reading. Whilst others have had there library cards for years now and have checked out every book twice.

I ask others for help too ya'know. But if we all help eachother with what we know (without the ego's) then this place can become nicer. Smile



Re: Script Request [message #330979 is a reply to message #330974] Sun, 18 May 2008 03:40 Go to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
reborn wrote on Sun, 18 May 2008 03:29

SSnipe wrote on Sun, 18 May 2008 06:14

reborn wrote on Sun, 18 May 2008 03:12

Not sure, try it dude... You lazy ass Razz

hehe not lazy just tired of spending hours on something you guys do in 2 minutes Wink



Two minutes, hehe.
Dude, I am like reading the next page of the same book you're reading. Whilst others have had there library cards for years now and have checked out every book twice.

I ask others for help too ya'know. But if we all help eachother with what we know (without the ego's) then this place can become nicer. Smile

well said........but with all honeslty im trying i really am....not trying to leach of people
Previous Topic: Questions on scripting.
Next Topic: Commands
Goto Forum:
  


Current Time: Fri Jan 10 21:46:14 MST 2025

Total time taken to generate the page: 0.01011 seconds