Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » scripts.dll 2.1
scripts.dll 2.1 [message #133226] Thu, 20 January 2005 16:32 Go to previous messageGo to next message
Blazea58 is currently offline  Blazea58
Messages: 408
Registered: May 2003
Karma: 0
Commander
Your on a roll here with these scripts, i can't belive how much can be done in renegade now thanks to you.


JFW_Clear_Money_Startup which will set the money of whatever its atatched to to 0 on startup

So im guessing if that script does work, it would take away the credits of whatever you attach the script to. (ie players?)

Quote:

Create a map structure with two entries, a string and a boolean value. Fill the map with all of the player's names, and mark each boolean value for each entry false. Reset this map structure on every map load. On a player's creation using any script attached to them, look up the player in this map structure and check its respected boolean value. If it's false, mark it as true and give it the opposite amount of starting credits. If you have to, you could easily look this up from the INI file. Or, if you think about it, their credits will be the starting amount when they are first created, so you could just get their money and reverse it. If you want to change it instead of just resetting it to 0, just give the player however many credits you want after you give the player the opposite amount. You could easily make it give a certain amount depending on which map was loaded here.


I'm sorry but i dont know much about that , so i dont think i could pull it off, but im guessing from the way it sounds it would do the exact effect i was looking for, just to reverse the starting amount.


It would just suck to make a map that is all based on starting with 0 credits, if the host can just change it to 99999. With my map, standing behind cash regsiters, getting kills, and gambling is the only sources of money gaining i wanted to have.


http://i175.photobucket.com/albums/w125/Blaze558/ECW_WebBanner1.jpg
scripts.dll 2.1 [message #133236] Thu, 20 January 2005 17:38 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

The idea is that you put an object on your map with the script JFW_Attach_Script_Player_Join on it.
You pass JFW_Clear_Money_Startup as the script to attach.
Then, any time a player joins, JFW_Clear_Money_Startup will be attached to it which will clear out any money they have.
It will only happen when they join, not if they die or whatever.


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
scripts.dll 2.1 [message #133256] Thu, 20 January 2005 22:08 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

ok, the ObjectLibraryManager::Create_Object hook is in and working on win32, going to do linux next.
I have discovered that it doesnt trigger for any objects pre-placed on the map in leveledit (e.g. buildings that have been pre-placed). Also, it triggers before any scripts on the object that has just been created get run and started.
The Post_Load_Level hook runs after any startup scripts have been started. If you use it to attach a script to an object however, that scripts startup event will trigger.
I am adding more scripts too
JFW_Attach_Script_Building_Startup
JFW_Attach_Script_Preset_Startup
JFW_Attach_Script_Type_Startup
When these scripts startup, they will attach the script to every object of the specified type in the game.

With the new hooks and stuff that I am adding to 2.0, it is now possible to build server-side mods like SSAOW without hooking any stock westwood scripts and without modifying the preset database


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
scripts.dll 2.1 [message #133263] Thu, 20 January 2005 23:59 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

ok, the ObjectLibraryManager::Create_Object hook is in and working great.
The hook procedure is passed the GameObject corresponding to the object that has just been created.

New script I will add JFW_Remove_Script_Player_Created which will remove all copies of a given script from a player object when that object is created.
Also JFW_Remove_Script_Preset_Created and JFW_Remove_Script_Type_Created

One big use for these last 3 is to remove all copies of M00_GrantPowerup_Created from a player object so they dont have any guns.
You can then use JFW_Attach_Script_xxx_Created to attach copies of JFW_GrantPowerup_Created to the script (so they dont get removed by the remove script) to give them whatever guns you want.
This is great for those times you cant edit the soldier presets. (the copies of JFW_Attach_Script_xxx_Created and JFW_Remove_Script_xxx_Created can be either stuck on a map object if its for a specific map or can be loaded in a Post_Load_Level hook by creating e.g. a daves arrow and putting the script on it if you are doing a server-side mod)


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
scripts.dll 2.1 [message #133265] Fri, 21 January 2005 00:25 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

Going to add the following engine calls (needed for the scripts I plan to write)
void Attach_Script_Building(const char *script, const char *params, int team)
void Attach_Script_Is_Preset(GameObject *obj,const char *preset,const char *script,const char *params, int team)
void Attach_Script_Is_Type(GameObject *obj,int type,const char *script,const char *params, int team)
void Attach_Script_Is_Building(GameObject *obj,const char *script,const char *params, int team)
void Remove_Script_Is_Preset(GameObject *obj,const char *preset,const char *script, int team)
void Remove_Script_Is_Type(GameObject *obj,int type,const char *script, int team)
void Remove_Script_Is_Building(GameObject *obj,const char *script, int team)
bool Is_A_Building(GameObject *obj)


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
scripts.dll 2.1 [message #133272] Fri, 21 January 2005 04:21 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

I am going to look into a console command that displays an emoticon over the head of a specific player that is visible to the members of their team only.
Like the radio command emoticons but without the radio commands.
You will be able to use any w3d file you like.


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
scripts.dll 2.1 [message #133273] Fri, 21 January 2005 04:30 Go to previous messageGo to next message
Deactivated is currently offline  Deactivated
Messages: 1503
Registered: February 2003
Karma: 0
General (1 Star)
Mammoth tank emoticons Razz
scripts.dll 2.1 [message #133280] Fri, 21 January 2005 05:15 Go to previous messageGo to next message
Sir Kane
Messages: 1701
Registered: March 2003
Location: Angerville
Karma: 0
General (1 Star)
About 1 % of all that is actually useful.
The rest are crappy console commands that people will abuse and scripts nobody will use.


Proud N9500 and proud N6270 user. Creator of the IEE libraries (original bhs.dll) and the RB series software.
http://n00bstories.com/image.fetch.php?id=1189992501http://www.n00bstories.com/image.fetch.php?id=1257492907
scripts.dll 2.1 [message #133290] Fri, 21 January 2005 09:37 Go to previous messageGo to next message
Pendullum is currently offline  Pendullum
Messages: 255
Registered: September 2003
Karma: 0
Recruit
still, at least hes releasing them

Aircraftkiller

(flaming is what homosexuals do)
scripts.dll 2.1 [message #133314] Fri, 21 January 2005 17:22 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

I have dropped the Caryall scripts since the idea I had to implement them isnt going to work.

The final list of new engine calls for 2.1 (more stuff will go into bhs.dll but this is the final list of new engine calls going into engine.h unless someone asks me for a script that needs another engine call)
Stuff for accessing the cGameData structure
bool Is_Script_Attached(GameObject *obj,const char *script)
void Attach_Script_Once(GameObject *obj,const char *script,const char *params)
void Attach_Script_Preset_Once(const char *script, const char *params, const char *preset, int team)
void Attach_Script_Type_Once(const char *script, const char *params, int type, int team)
void Attach_Script_Building(const char *script, const char *params, int team)
void Attach_Script_Is_Preset(GameObject *obj,const char *preset,const char *script,const char *params, int team)
void Attach_Script_Is_Type(GameObject *obj,int type,const char *script,const char *params, int team)
void Attach_Script_Is_Building(GameObject *obj,const char *script,const char *params, int team)
void Remove_Script_Is_Preset(GameObject *obj,const char *preset,const char *script, int team)
void Remove_Script_Is_Type(GameObject *obj,int type,const char *script, int team)
bool Is_A_Building(GameObject *obj)
All of them still need testing to make sure they work but they have all been coded.


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
scripts.dll 2.1 [message #133329] Fri, 21 January 2005 18:09 Go to previous messageGo to next message
Naamloos is currently offline  Naamloos
Messages: 771
Registered: April 2004
Location: The Netherlands
Karma: 0
Colonel
jonwil

I am going to look into a console command that displays an emoticon over the head of a specific player that is visible to the members of their team only.
Like the radio command emoticons but without the radio commands.
You will be able to use any w3d file you like.


Lol that would be nice... But if someone makes a mammy apear wouldn't it block the view of your team? Confused

Maybe a size limit? Or 1 size for everything?
scripts.dll 2.1 [message #133720] Sun, 23 January 2005 06:32 Go to previous messageGo to next message
Titan1x77 is currently offline  Titan1x77
Messages: 1086
Registered: February 2003
Karma: 0
General (1 Star)
Back on topic.....


Looks good so far, keep up the good work.


"But if the gameplay sucks, the looks don't matter at all." - Sir Phoenixx

scripts.dll 2.1 [message #133825] Sun, 23 January 2005 11:57 Go to previous messageGo to next message
YSLMuffins is currently offline  YSLMuffins
Messages: 1144
Registered: February 2003
Location: Moved a long time ago (it...
Karma: 0
General (1 Star)
Moderator - Mod Forum
Purged. :-\

-YSLMuffins
The goddess of all (bread products)
See me online as yslcheeze
scripts [message #133876] Sun, 23 January 2005 12:38 Go to previous message
dark_wolf_from_hell is currently offline  dark_wolf_from_hell
Messages: 14
Registered: January 2005
Karma: 0
Recruit
it wold be good if you can make the load time faster for slow coms it gives the fast players more time to get to your base
Previous Topic: C&C Islands- water in tunnels
Next Topic: buildings.zip
Goto Forum:
  


Current Time: Tue May 14 21:44:45 MST 2024

Total time taken to generate the page: 0.00872 seconds