is there a way to make a weapon have multiple different attacks?
another question!
- Edited
I'm assuming you mean different animations? and old way I went about with it, was to have 5 different attack animations on the player character, then have this script run in the global events scripts whenever a character took damage, changing the attack animation to a random one of the five.. This unfortunately also plays the animation for some reason, which eventually made me stop using it, but you can use the script as an example of one way to go about making the boring normal attack animation a bit more interesting.
$attackanim = random(1, 5);
if $attackanim == 1 then
override_animation(player, "attack", "attack");
elseif $attackanim == 2 then
override_animation(player, "attack", "attack2");
elseif $attackanim == 3 then
override_animation(player, "attack", "attack3");
elseif $attackanim == 4 then
override_animation(player, "attack", "attack4");
elseif $attackanim == 5 then
override_animation(player, "attack", "attack5");
end;
oh nice this would work well for the stuff I'm doing at the moment
if I can iron out that bug your mentioning.
skumleren no, I mean multiple different attacks from 1 weapon doing different things.
LuckyBoyAK There is a couple of ways depending on what you want. There is a couple of scripts you can attach to the weapon like "on equip" script. Make a script that give your character multiple skills from the skill editor, like cleave, wirldwind or something similar you make in there, then have another script take them away on the "on unequip" part of the item script.
If you just want the item to do random things, you can attach an "on hit script" on the item as well, where the only limit is your imagination.
skumleren thx the only problem I find with this is that skills have unlimited range.
LuckyBoyAK Arh true that will probably be implemented at some point. If you use the on hit script, you could possibly ductape some kind of crude range checker inside that script, seeing as it can find the $target coordinates, compare it to players coords, and make the ability fizzle if the distance is too great. Haven't got something lying around, but there are some bright heads around that knows how to do it I'm sure.
Thx again!
- Edited
Once I was working on “The Butcher from the Castle Black” I made multiple copy’s of one magic staff And I made a widget to switch between them. Each stuff had it’s own “on hit” script with different effects.
https://rpginabox.com/forum/d/137-the-butcher-of-the-castle-black
There is another way as well. You can make a global property for a selected ability and change it via skill’s script.
And then use different effects in weapon’s “on hit” script based on this property.
That's really nice I thank you so much, so much for sharing your knowledge!!!