Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Timer with a chat class command?
Timer with a chat class command? [message #377350] Tue, 24 March 2009 21:13 Go to next message
whtdrgnpl is currently offline  whtdrgnpl
Messages: 17
Registered: July 2007
Karma: 0
Recruit
How do I use a timer with a chat class command? I've been trying to use this on one of them:
Commands->Start_Timer(obj,this,3.0f,1);

but I keep getting this error:
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 2 from 'BuildCommand *const ' to 'ScriptClass *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 1 from 'int' to 'GameObject *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast


Huh
Re: Timer with a chat class command? [message #377351 is a reply to message #377350] Tue, 24 March 2009 21:36 Go to previous messageGo to next message
nopol10 is currently offline  nopol10
Messages: 1043
Registered: February 2005
Location: Singapore
Karma: 0
General (1 Star)
You have to make a ScriptImpClass script with a Timer_Expired event and attach that script to an invisible object. Put whatever you need it to run in the Timer_Expired.

nopol10=Nopol=nopol(GSA)

http://i14.photobucket.com/albums/a330/napalmic/siggy.jpg
Re: Timer with a chat class command? [message #377357 is a reply to message #377350] Wed, 25 March 2009 00:33 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)
whtdrgnpl wrote on Wed, 25 March 2009 04:13

How do I use a timer with a chat class command? I've been trying to use this on one of them:
Commands->Start_Timer(obj,this,3.0f,1);

but I keep getting this error:
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 2 from 'BuildCommand *const ' to 'ScriptClass *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 1 from 'int' to 'GameObject *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast


Huh


You can't, the chat command class has nothing to do with ScriptImpClass
Re: Timer with a chat class command? [message #377358 is a reply to message #377350] Wed, 25 March 2009 01:03 Go to previous message
whtdrgnpl is currently offline  whtdrgnpl
Messages: 17
Registered: July 2007
Karma: 0
Recruit
I had a feeling that was what I had to do actually but I couldn't figure out how to get it to work with what I was doing but I got it working now, thanks.

[Updated on: Wed, 25 March 2009 01:04]

Report message to a moderator

Previous Topic: Small Level Editor Tipp
Next Topic: Door Request Please!
Goto Forum:
  


Current Time: Sun Dec 22 02:49:02 MST 2024

Total time taken to generate the page: 0.00761 seconds