Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Script Request  () 1 Vote
Script Request [message #330103] Sun, 11 May 2008 12:24 Go to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
does anyone have a fog crate or fog command or anything to know so i can tyr to make a fog crate? like xpz server used to have
Re: Script Request [message #330105 is a reply to message #330103] Sun, 11 May 2008 12:27 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)
The fog function needs bhs.dll on the client, players without bhs.dll would not have the effect. Players do not need another reason to not use the scripts.dll made by BHS.


Re: Script Request [message #330115 is a reply to message #330105] Sun, 11 May 2008 13:22 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, 11 May 2008 12:27

The fog function needs bhs.dll on the client, players without bhs.dll would not have the effect. Players do not need another reason to not use the scripts.dll made by BHS.

i know....im aware its not for a server....well it is...but not to play on a test server for the video im making and i got this bad add idea but i need some fog and rain in a command i can use so please?
Re: Script Request [message #330131 is a reply to message #330103] Sun, 11 May 2008 16:06 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)
Erm, this should work then...
class fogChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Commands->Set_Fog_Enable(1);
		Commands->Set_Fog_Range (0.5,25.0f,3.5f);
	}
};
ChatCommandRegistrant<fogChatCommand> fogChatCommandReg("!fog",CHATTYPE_ALL,0,GAMEMODE_ALL);



Re: Script Request [message #330166 is a reply to message #330103] Sun, 11 May 2008 21:30 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 add just a lil bit oF rain...no lighting plz :Dc

[Updated on: Sun, 11 May 2008 22:01]

Report message to a moderator

Re: Script Request [message #330183 is a reply to message #330103] Mon, 12 May 2008 00:32 Go to previous messageGo to next message
cAmpa is currently offline  cAmpa
Messages: 597
Registered: March 2006
Karma: 0
Colonel
Eherm, where is that problem to search in scripts for the ready useable script functions?

In "scripts.h" is all what you need about weather.


Bückstabü!
Re: Script Request [message #330190 is a reply to message #330131] Mon, 12 May 2008 02:36 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)
Try this
class fogChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Commands->Set_Fog_Enable(1);
		Commands->Set_Fog_Range (0.5,25.0f,3.5f);
                Commands->Set_Rain(10.0f,3.5f,true);
	}
};
ChatCommandRegistrant<fogChatCommand> fogChatCommandReg("!fog",CHATTYPE_ALL,0,GAMEMODE_ALL);



Re: Script Request [message #330223 is a reply to message #330103] Mon, 12 May 2008 10:15 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)
ok ty ill test it soon as i figure out why my server wont load up =/
Re: Script Request [message #330289 is a reply to message #330103] Mon, 12 May 2008 20: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)
itworks now how i turn it off lol?
will this work

class fogChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
Commands->Set_Fog_Enable(o);
Commands->Set_Fog_Range (0.5,25.0f,3.5f);
Commands->Set_Rain(10.0f,3.5f,false);
}
};
ChatCommandRegistrant<fogChatCommand> fogChatCommandReg("!fogoff",CHATTYPE_ALL,0,GAMEMODE_ALL);
Re: Script Request [message #330296 is a reply to message #330289] Mon, 12 May 2008 22:01 Go to previous messageGo to next message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma: 0
Colonel
SSnipe wrote on Tue, 13 May 2008 05:06

itworks now how i turn it off lol?
will this work

class fogChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
Commands->Set_Fog_Enable(o);
Commands->Set_Fog_Range (0.5,25.0f,3.5f);
Commands->Set_Rain(10.0f,3.5f,false);
}
};
ChatCommandRegistrant<fogChatCommand> fogChatCommandReg("!fogoff",CHATTYPE_ALL,0,GAMEMODE_ALL);


And what about timers?

It's harder but if you look better on reborn's codes Im sure you will know it.
Re: Script Request [message #330311 is a reply to message #330296] Tue, 13 May 2008 01:11 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)
ExEric3 wrote on Mon, 12 May 2008 22:01

SSnipe wrote on Tue, 13 May 2008 05:06

itworks now how i turn it off lol?
will this work

class fogChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
Commands->Set_Fog_Enable(o);
Commands->Set_Fog_Range (0.5,25.0f,3.5f);
Commands->Set_Rain(10.0f,3.5f,false);
}
};
ChatCommandRegistrant<fogChatCommand> fogChatCommandReg("!fogoff",CHATTYPE_ALL,0,GAMEMODE_ALL);


And what about timers?

It's harder but if you look better on reborn's codes Im sure you will know it.



naw its for testing something and some filming...on and off command well do
Re: Script Request [message #330315 is a reply to message #330190] Tue, 13 May 2008 01:39 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)
Try this
class fogoffChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Commands->Set_Fog_Enable(0);
                Commands->Set_Rain(0.0f,1.0f,true);
	}
};
ChatCommandRegistrant<fogoffChatCommand> fogoffChatCommandReg("!fogoff",CHATTYPE_ALL,0,GAMEMODE_ALL);




Re: Script Request [message #330351 is a reply to message #330315] Tue, 13 May 2008 10:20 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 Tue, 13 May 2008 01:39

Try this
class fogoffChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Commands->Set_Fog_Enable(0);
                Commands->Set_Rain(0.0f,1.0f,true);
	}
};
ChatCommandRegistrant<fogoffChatCommand> fogoffChatCommandReg("!fogoff",CHATTYPE_ALL,0,GAMEMODE_ALL);



forgot to say also inclusing turning rain off to =/ I THINK ill i ahve to do is trun the true to false on the rain string correct reborn?
Re: Script Request [message #330414 is a reply to message #330103] Tue, 13 May 2008 14:09 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)
nvm i got it thanks....now what other weather is there?

how about snow?
lighting? wats the command for those? off and on?
Re: Script Request [message #330473 is a reply to message #330103] Wed, 14 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)
typedef void (*_Set_Clouds) (float Cover,float Gloominess,float Transition);
typedef void (*_Set_Lightning) (float Intensity,float StartDistance,float EndDistance,float Heading,float Distribution,float Transition);
typedef void (*_Set_War_Blitz) (float Intensity,float StartDistance,float EndDistance,float Heading,float Distribution,float Transition);
typedef void (*_Set_Wind) (float Heading,float Speed,float Variability,float Transition);
typedef void (*_Set_Rain) (float Density,float Transition,bool Unused);
typedef void (*_Set_Snow) (float Density,float Transition,bool Unused);
typedef void (*_Set_Ash) (float Density,float Transition,bool Unused);
typedef void (*_Set_Fog_Enable) (bool Enable);
typedef void (*_Set_Fog_Range) (float StartDistance,float EndDistance,float Transition);



[Updated on: Wed, 14 May 2008 02:48]

Report message to a moderator

Re: Script Request [message #330528 is a reply to message #330473] Wed, 14 May 2008 11: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)
reborn wrote on Wed, 14 May 2008 02:48

typedef void (*_Set_Clouds) (float Cover,float Gloominess,float Transition);
typedef void (*_Set_Lightning) (float Intensity,float StartDistance,float EndDistance,float Heading,float Distribution,float Transition);
typedef void (*_Set_War_Blitz) (float Intensity,float StartDistance,float EndDistance,float Heading,float Distribution,float Transition);
typedef void (*_Set_Wind) (float Heading,float Speed,float Variability,float Transition);
typedef void (*_Set_Rain) (float Density,float Transition,bool Unused);
typedef void (*_Set_Snow) (float Density,float Transition,bool Unused);
typedef void (*_Set_Ash) (float Density,float Transition,bool Unused);
typedef void (*_Set_Fog_Enable) (bool Enable);
typedef void (*_Set_Fog_Range) (float StartDistance,float EndDistance,float Transition);



lol so im guessing thats all the weather changes.....now i got to figure out how to put them in a chat hook....sorry i know im c++ retarted but im guessing the way it is now wont work?
i think i understand some so let me try it out


1>.\gmmain.cpp(1592) : error C2039: 'Set_lightning' : is not a member of 'ScriptCommands'
1>        c:\users\lil blueyes\desktop\ssgm source\ssgm source\ssgm source\scripts.h(695) : see declaration of 'ScriptCommands'
1>.\gmmain.cpp(1600) : error C2039: 'Set_lightning' : is not a member of 'ScriptCommands'
1>        c:\users\lil blueyes\desktop\ssgm source\ssgm source\ssgm source\scripts.h(695) : see declaration of 'ScriptCommands'
1>.\gmmain.cpp(1642) : fatal error C1071: unexpected end of file found in comment



i get that message when i try to do lightning
how can i fix it?

class cloudsChatCommand : public ChatCommandClass {
		void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Commands->Set_Clouds(10.5f,20.0f,9.5f);
		}
};

ChatCommandRegistrant<cloudsChatCommand> cloudsChatCommandReg("!clouds",CHATTYPE_ALL,0,GAMEMODE_ALL);

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

ChatCommandRegistrant<cloudsoffChatCommand> cloudsoffChatCommandReg("!cloudsoff",CHATTYPE_ALL,0,GAMEMODE_ALL);



for the clouds.....the !clouds wont work but the !cloudsoff works....how can i get the !clouds to work

 class windChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
Commands->Set_Wind(20.7f,15.0f,5.0f,3.5f);
	}
};


ChatCommandRegistrant<windChatCommand> windChatCommandReg("!wind",CHATTYPE_ALL,0,GAMEMODE_ALL);






is there something im missing?

ps sorry its kinda alot i really am trying my best i got !snow to work and understood a little bit of it but im still...well...ya please and thank you[/size]

[Updated on: Wed, 14 May 2008 15:11]

Report message to a moderator

Re: Script Request [message #330542 is a reply to message #330103] Wed, 14 May 2008 15:16 Go to previous messageGo to next message
EA-DamageEverything
Messages: 423
Registered: January 2005
Location: Germany
Karma: 0
Commander
A helpful resource getting some values for the weather is LevelEdit. Make a new mod package, place a .lvl file into the levels dir and load up your mod.

The rest is shown in the picture. In LE click on EDIT -> Background settings and fiddle around with the values.

BTW back to the fog crate, I can help you with that. Thanks to Reborn, it's quite easy to create one based on his code. In Love
  • Attachment: weather.jpg
    (Size: 96.69KB, Downloaded 87 times)
Re: Script Request [message #330544 is a reply to message #330542] Wed, 14 May 2008 15:20 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)
EA-DamageEverything wrote on Wed, 14 May 2008 15:16

A helpful resource getting some values for the weather is LevelEdit. Make a new mod package, place a .lvl file into the levels dir and load up your mod.

The rest is shown in the picture. In LE click on EDIT -> Background settings and fiddle around with the values.

BTW back to the fog crate, I can help you with that. Thanks to Reborn, it's quite easy to create one based on his code. In Love

helped a lot have not tested it yet but i have no yet found way to do the clouds


quick question when i put in a number like
180.0f

do i put it like this
180f
180.0f
or
180.00f
or
180.000f

[Updated on: Wed, 14 May 2008 16:31]

Report message to a moderator

Re: Script Request [message #330597 is a reply to message #330103] Wed, 14 May 2008 20:37 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

It doesn't matter how many zeros you use, the compiler will treat them all the same anyway.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: Script Request [message #330600 is a reply to message #330103] Wed, 14 May 2008 21: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)
well it seems likees evrtyhing fine but i cant get my
clouds
war blitz
lightning
wind

as for the lightning and war blitz or how ever you say iti did the command the way
EA-DamageEverything posted above with that info i made the chat hook

heres what i got
  class LightningChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Set_Lightning(0.80f,0.00f,1.00f,239.0f,0.80f,3.5f);
	}
};

ChatCommandRegistrant<LightningChatCommand> LightningChatCommandReg("!Lightning",CHATTYPE_ALL,0,GAMEMODE_ALL);



  class warChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
  Set_War_Blitz(0.80f,0.00f,1.00f,239.0f,0.80f,3.5f);
	}
};

ChatCommandRegistrant<warChatCommand> warChatCommandReg("!war",CHATTYPE_ALL,0,GAMEMODE_ALL);




another problem is how cna i get the sky to change color? iv seen it on kamuix serv...they done it blue and green and red....i tryed to ask them but no one answers i think they used

commands->Set_Screen_Fade_Color

if not can someone tell me what they used?
with that i tryed to make this but no luck ether

class greenfogChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
	commands->Set_Screen_Fade_Color(Get_Float_Parameter("green"),0.0f);
		}
	};

ChatCommandRegistrant<greenfogChatCommand> greenfogChatCommandReg("!greenfog",CHATTYPE_ALL,0,GAMEMODE_ALL);



but im mostly sure im complelty wrong

pleas ehelp and thank you
Re: Script Request [message #330608 is a reply to message #330103] Thu, 15 May 2008 03:02 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)
Set_Lightning and Set_War_Blitz are part of the script Commands class, you need to put "Commands->" before them when using them. You compilers error message earlier was miss-leading, but I checked and it is part of that class.

I also checked these functions out at some point last year and noticed the effects seemed to do very little, if not nothing at all. Perhaps the distance and spread stuff is very sensitive, try diffrent float values ranging from very large to very small.



Re: Script Request [message #330639 is a reply to message #330608] Thu, 15 May 2008 09:56 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 Thu, 15 May 2008 03:02

Set_Lightning and Set_War_Blitz are part of the script Commands class, you need to put "Commands->" before them when using them. You compilers error message earlier was miss-leading, but I checked and it is part of that class.

I also checked these functions out at some point last year and noticed the effects seemed to do very little, if not nothing at all. Perhaps the distance and spread stuff is very sensitive, try diffrent float values ranging from very large to very small.

i have added commands-> and yet i get a new error

1>.\gmmain.cpp(1599) : error C2065: 'commands' : undeclared identifier
1>.\gmmain.cpp(1599) : error C2227: left of '->Set_War_Blitz' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\gmmain.cpp(1608) : error C2065: 'commands' : undeclared identifier
1>.\gmmain.cpp(1608) : error C2227: left of '->Set_Lightning' must point to class/struct/union/generic type
1>        type is ''unknown-type''

[Updated on: Thu, 15 May 2008 14:03]

Report message to a moderator

Re: Script Request [message #330718 is a reply to message #330103] Fri, 16 May 2008 01:52 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)
What You think reborn?
Re: Script Request [message #330719 is a reply to message #330103] Fri, 16 May 2008 01:55 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)
"Commands", not "commands".
Re: Script Request [message #330721 is a reply to message #330719] Fri, 16 May 2008 02:00 Go to previous messageGo to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
RoShamBo wrote on Fri, 16 May 2008 01:55

"Commands", not "commands".

omfg so simple...let me try it out
Previous Topic: Questions on scripting.
Next Topic: Commands
Goto Forum:
  


Current Time: Fri Jan 10 21:53:25 MST 2025

Total time taken to generate the page: 0.01222 seconds