So, how can I add damages to the canon ?

Moderator: NADEO
I tried with your link, but when I put it on the script, it's work only for me when I shoot a custom weapon, but it's dont write the text when the cannon fire with the custom weapon :/Eole wrote:Actions don't deal damage by default, you have to manage that yourself in the game mode script. You can read this to learn how to do it.
The Cannon item.Eole wrote:I'm not sure to understand what you are trying to do. You have a custom weapon, it deals damage when you fire the weapon yourself but not when the cannon fire it. What is this cannon exactly?
Code: Select all
if(Event.Param1 == "cannon"){
if(Event.Victim != Null){
AddPlayerArmor(Event.Victim, -100, Null, 1);
}
}
PassOn(Event);
Oh thanks, it's workTeardrop wrote:Hi,
By default, the first parameter of an OnActionCustomEvent, created by a cannon is "cannon" , not "damage".
So you have to use this :
You can also modify the action script (by checking the "Custom action" button), if you want it to comport itself like a normal action.Code: Select all
if(Event.Param1 == "cannon"){ if(Event.Victim != Null){ AddPlayerArmor(Event.Victim, -100, Null, 1); } } PassOn(Event);
Users browsing this forum: No registered users and 1 guest