Hello, I was trying to create a beautiful canon item, but it's not deal any damages ( Tested with melee scripts and bot. )
So, how can I add damages to the canon ?
Canon deal no damages
Moderator: NADEO
Re: Canon deal no damages
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.
Re: Canon deal no damages
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.
Re: Canon deal no damages
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?
Re: Canon deal no damages
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?
Re: Canon deal no damages
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.
By default, the first parameter of an OnActionCustomEvent, created by a cannon is "cannon" , not "damage".
So you have to use this :
Code: Select all
if(Event.Param1 == "cannon"){
if(Event.Victim != Null){
AddPlayerArmor(Event.Victim, -100, Null, 1);
}
}
PassOn(Event);
Re: Canon deal no damages
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);
Who is online
Users browsing this forum: No registered users and 3 guests