Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Message script bug?
Message script bug? [message #368070] Tue, 20 January 2009 08:51 Go to next message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
ATM i use "JFW_Message_Send_Death", this works fine and displays the Kill-message.

BUT "JFW_Message_Send_Custom_Team" seems to have a bug and displays not the message (e.g. "...under attack"), but the numeral message, what is used for the event! (like "8011")...

???
Re: Message script bug? [message #368071 is a reply to message #368070] Tue, 20 January 2009 09:10 Go to previous messageGo to next message
cAmpa is currently offline  cAmpa
Messages: 597
Registered: March 2006
Karma: 0
Colonel
void JFW_Message_Send_Custom_Team::Custom(GameObject *obj,int message,int param,GameObject *sender)
{
	if (message == Get_Int_Parameter("Message"))
	{
		int team = Get_Int_Parameter("Player_Type");
		Create_2D_Sound_Team(Get_Parameter("Sound"),team);
		Send_Message_Team(team,Get_Int_Parameter("Red"),Get_Int_Parameter("Green"),Get_Int_Parameter("Blue"),Get_Parameter("Message"));
		if (Get_Int_Parameter("Delete"))
		{
			Destroy_Script();
		}
	}
}


This is the code and yes it looks like you are right.


Bückstabü!
Re: Message script bug? [message #368085 is a reply to message #368071] Tue, 20 January 2009 10:53 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
cAmpa wrote on Tue, 20 January 2009 09:10

void JFW_Message_Send_Custom_Team::Custom(GameObject *obj,int message,int param,GameObject *sender)
{
	if (message == Get_Int_Parameter("Message"))
	{
		int team = Get_Int_Parameter("Player_Type");
		Create_2D_Sound_Team(Get_Parameter("Sound"),team);
		Send_Message_Team(team,Get_Int_Parameter("Red"),Get_Int_Parameter("Green"),Get_Int_Parameter("Blue"),Get_Parameter("Message"));
		if (Get_Int_Parameter("Delete"))
		{
			Destroy_Script();
		}
	}
}


This is the code and yes it looks like you are right.




What's the ScriptRegistrant look like?
Re: Message script bug? [message #368095 is a reply to message #368070] Tue, 20 January 2009 11:33 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
You want a Death Message? i can script you one theat you have to attach to the object, if noone already made it for you
Re: Message script bug? [message #368098 is a reply to message #368095] Tue, 20 January 2009 11:37 Go to previous messageGo to next message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
Would be nice:

I need:

- Kill message (with Textmessage and Sound)
- Damaged=under attack message (with Textmessage and Sound)
- Repaired message (with Textmessage and Sound)


and for use in a serverside mod-package (pgk), so that anyone can use and play it, not only the client or so...

[Updated on: Tue, 20 January 2009 11:38]

Report message to a moderator

Re: Message script bug? [message #368110 is a reply to message #368070] Tue, 20 January 2009 13:24 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
Here a Compiled Scripts.dll with:

MR_Attack_Announce (Under Attack Message)
Parameters:
Health (Example 25, when the object has reached 0-25HP then it will Display the "Under Attack Message")
Red, Green, Blue: (These are the Message Colors)
Under_Attack_Sound: (Fill in the .wav sound of "Turret Under Attack").
Under_Attack_Sound: (Fill in the Message to Display ("Nod Turret Under Attack").



MR_Death_Announce (Death Message)
Parameters:
Destroyed_Sound: (Fill in the Sound of "Nod Turret Destroyed").
Red, Green, Blue: (These are the Message Colors)
Destroyed_Message: (Fill in the Message to Display ("Nod Turret Destroyed").



Download the Compiled Scripts.dll here: Download.

Re: Message script bug? [message #368111 is a reply to message #368070] Tue, 20 January 2009 13:26 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
Oh Sorry i forgot to make the "Repaired" Script Sad anyway:

Source:

.CPP
void MR_Attack_Announce::Damaged(GameObject *obj,GameObject *damager,float damage)
{
	if (Commands->Get_Health(obj) <= Get_Float_Parameter("Health"))
	{
			Commands->Create_2D_Sound(Get_Parameter("Under_Attack_Sound"));
	Send_Message(Get_Int_Parameter("Red"),Get_Int_Parameter("Green"),Get_Int_Parameter("Blue"),Get_Parameter("Under_Attack_Message"));
			Destroy_Script();
}
}
ScriptRegistrant<MR_Attack_Announce> MR_Attack_Announce_Registrant("MR_Attack_Announce","Red:int,Green:int,Blue:int,Health:float,Under_Attack_Sound:string,Under_Attack_Message:string");


void MR_Death_Announce::Killed(GameObject *obj,GameObject *shooter)
{
		Commands->Create_2D_Sound(Get_Parameter("Destroyed_Sound"));
  Send_Message(Get_Int_Parameter("Red"),Get_Int_Parameter("Green"),Get_Int_Parameter("Blue"),Get_Parameter("Destroyed_Message"));
}
ScriptRegistrant<MR_Death_Announce> MR_Death_Announce_Registrant("MR_Death_Announce","Destroyed_Sound:string,Red:int,Green:int,Blue:int,Destroyed_Message:string");



.H
class MR_Attack_Announce : public ScriptImpClass {
	void Damaged(GameObject *obj,GameObject *damager,float damage);
};

class MR_Death_Announce : public ScriptImpClass {
	void Killed(GameObject *obj,GameObject *shooter);
};
Re: Message script bug? [message #368116 is a reply to message #368111] Tue, 20 January 2009 13:54 Go to previous messageGo to next message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
thx a lot!!!
downloading.

how to use the source?

I never compiled anything for renegade.
I have no idea of c++ (only delphi Wink)


PS: later i would need an script for an airstrike Smile

[Updated on: Tue, 20 January 2009 14:04]

Report message to a moderator

Re: Message script bug? [message #368117 is a reply to message #368070] Tue, 20 January 2009 14:07 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
The Source is in the .DLL, its just that people can edit the code.
For the Airstrike, i can make you one, i just need more info´s, How to Trigger it (per Chat Command)? on Zone Enter? just tell me, need more info´s Wink
I think you already saw my Airstrike Video?

[Updated on: Tue, 20 January 2009 14:08]

Report message to a moderator

Re: Message script bug? [message #368124 is a reply to message #368117] Tue, 20 January 2009 14:30 Go to previous messageGo to next message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
mǻdrãçķz wrote on Tue, 20 January 2009 15:07

The Source is in the .DLL, its just that people can edit the code.
For the Airstrike, i can make you one, i just need more info´s, How to Trigger it (per Chat Command)? on Zone Enter? just tell me, need more info´s Wink
I think you already saw my Airstrike Video?


1)

ATM not, i guess Sad

with the airsrike thing, we can talk for the next release.
but this would be a nice use for gdi airstrip, the old nod-aircraft and a10 gdi aircraft.

2)

would be great, if you can compile the "building repaired" script too. not only for buildings, but for mounted vehicles (turrets) too.




Re: Message script bug? [message #368125 is a reply to message #368070] Tue, 20 January 2009 14:42 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
You can attach the code to every Object, Building, Vehicle or whatever and im gonna post another version with the "Building Repaired" Function tomorrow, its late g2g sleep now lol. The good thing is you need just to Replace the old Scripts.dll in your Renegade/data folder without reediting your Map because it will update and existing Code Very Happy

[Updated on: Tue, 20 January 2009 14:44]

Report message to a moderator

Re: Message script bug? [message #368139 is a reply to message #368125] Tue, 20 January 2009 15:19 Go to previous messageGo to next message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
mǻdrãçķz wrote on Tue, 20 January 2009 15:42

You can attach the code to every Object, Building, Vehicle or whatever and im gonna post another version with the "Building Repaired" Function tomorrow, its late g2g sleep now lol. The good thing is you need just to Replace the old Scripts.dll in your Renegade/data folder without reediting your Map because it will update and existing Code Very Happy


tested and works! thx a lot!!
with the comming "repaired" script it solved a problem i had a long time!

but 2 bugs:
1.) It announces even an "attack" at the own teams installations, even if there is no real damage.
2.) It should have been a timer attached, so it repeads attack-messages every x seconds, if there is still attack. ATM there is only 1 attack-message.

200% would be different messages/sounds for NOD/GDI (triggered by team 0, 1).... Smile


[Updated on: Tue, 20 January 2009 18:39]

Report message to a moderator

Re: Message script bug? [message #368166 is a reply to message #368070] Tue, 20 January 2009 18:47 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
what are the sound named for turret under attack and turret destroyed ?

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Message script bug? [message #368169 is a reply to message #368166] Tue, 20 January 2009 18:52 Go to previous message
rrutk is currently offline  rrutk
Messages: 617
Registered: June 2007
Karma: 0
Colonel
Gen_Blacky wrote on Tue, 20 January 2009 19:47

what are the sound named for turret under attack and turret destroyed ?



Nod Turret destroyed.
M00BNTU_KILL0001I1EVAN_SND
M00BNTU_KILL0002I1EVAG_SND

Nod Turret under attack.
M00BNTU_TDFE0002I1EVAG_SND
Previous Topic: Repair Ray?
Next Topic: Lightmapping
Goto Forum:
  


Current Time: Mon Dec 23 14:10:36 MST 2024

Total time taken to generate the page: 0.00896 seconds