Message script bug? [message #368070] |
Tue, 20 January 2009 08:51 |
|
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 |
|
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 |
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 #368098 is a reply to message #368095] |
Tue, 20 January 2009 11:37 |
|
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 #368111 is a reply to message #368070] |
Tue, 20 January 2009 13:26 |
|
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 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 #368117 is a reply to message #368070] |
Tue, 20 January 2009 14:07 |
|
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
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 |
|
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
I think you already saw my Airstrike Video?
|
1)
ATM not, i guess
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 |
|
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
[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 |
|
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
|
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)....
[Updated on: Tue, 20 January 2009 18:39] Report message to a moderator
|
|
|
|
Re: Message script bug? [message #368169 is a reply to message #368166] |
Tue, 20 January 2009 18:52 |
|
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
|
|
|