Ganryu Posted December 6, 2015 How do I go about to add a charge attack to a decorate monster? The minotaur charge action from Hexen/Heretic seems restricted to derived classes. 0 Share this post Link to post
scifista42 Posted December 6, 2015 The easiest solution is, well, to make your custom actor derived from Minotaur and then redefine all its properties to anything you want (even something completely different than Minotaur), then you should be able to use Minotaur's functions safely. There would be possibilities to do it without the specific Minotaur's functions too. See the wiki reference for A_MinotaurCharge:A_MinotaurCharge (no parameters) Does nothing if the calling actor has no current target. Otherwise, if the minotaur's special1 field is greater than 0, spawns a puff (PhoenixPuff in Heretic, PunchPuff in other games), gives it a vertical velocity of 2, and decreases the special1 counter. If the counter was not greater than 0, removes the SKULLFLY and INVULNERABLE flags from the calling actor (normal maulotaurs are invulnerable when charging) and breaks the charge, putting the actor in its See state. The behaviour-defining algorithm of A_MinotaurCharge is described rather well in the quote above - what actions are performed, in what order, what is conditioned by what, etc. Now you can try to replicate the behaviour for your own actor, using other (more elemental) DECORATE functions. A few hints: -You can check if actor has a target for example via A_JumpIfTargetInLOS, or via A_JumpIf with condition IsPointerEqual(AAPTR_TARGET,AAPTR_NULL) (not sure if the latter works, though), or possibly other ways. -To substitute the special1 countdown, you can use "dummy" inventory items and A_GiveInventory / A_TakeInventory / A_JumpIfInventory, a popular method of making conditional events in DECORATE. -Changing actor's velocity can be done via ThrustThing and/or ThrustThingZ. (yes, despite not having the A_ prefix, action specials work in DECORATE) -Spawning puffs can be done via A_SpawnItemEx. -Setting and unsetting actor flags can be done via A_ChangeFlag. List of all flags is here. -State jumps can be done via goto command or via one of many functions from A_Jump / A_JumpIf family. 0 Share this post Link to post
Ganryu Posted December 6, 2015 Oh! Thanks. For some reason I had it in my mind that class actions were all atomic objects that you could not replicate through common decorate features... :D 0 Share this post Link to post