Skip to content
#4351
Auto-translated
Can a catapult be assigned an animation for firing? Like in the Orc campaign, mission 3.
Everything that exists in a campaign can be done on any map. You need to assign a script name to the catapult (e.g., 'catapult'), and then rotate it if needed:
SetObjectRotation('catapult', ANGLE);
To fire:
PlayObjectAnimation('catapult', 'rangeattack', ONESHOT);
Explosion on impact:
PlayVisualEffect('/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)', '', '', X, Y, 1, 0, GROUND);
Play2DSound('/Sounds/_(Sound)/Spells/FireBallHit.xdb#xpointer(/Sound)');
And there's another task: capture 5 cities, how can I implement this?
I think you need to use the CheckOwner() function (or something similar, which checks the owner of an object) and call it in a loop, or after battles, or with a trigger for a new day.

Statistics

Welcome our newest member: dodoD0D0

Users Online 3 users 1466 guests