Jump to content

Photo

Movement issues with Autoghosted walking-type enemy?

ghost autoghost wall bouncer

  • Please log in to reply
7 replies to this topic

#1 Pineconn

Pineconn

    Recipient of Ways

  • Members
  • Real Name:Mike
  • Location:Ohio

Posted 23 December 2014 - 05:07 PM

Tried to search for some answers to no avail.

Are there known issues with walking enemies that are Autoghosted? I know you're supposed to use the "other" enemy type, but I want the hit effect for this enemy to be magic reduction. In any case, I'm trying to set up Saffith's Wall Bouncer enemy, and the only change I made was to multiply xStep/yStep by Sqrt(2) right before the while(true) loop (to make movement smoother). Regardless of this edit, occasionally the Wall Bouncer's appearance glitches when it moves over tall grass or when it changes direction, which is obviously a problem. It seems like it gets displaced by a tile or two for one frame, but resumes normal movement as if it never happened. This does NOT occur when the movement type is "other," but again, I want it to deplete your magic meter, so I have to make it a walker... (or do I?).

Yes, I'm a Ghost noob. I'm trying to get into it.

Edited by Pineconn, 23 December 2014 - 05:08 PM.


#2 Saffith

Saffith

    IPv7 user

  • Members

Posted 23 December 2014 - 05:26 PM

What animation type do you have set? If it's multi-directional, maybe the thing's just turning.

#3 Pineconn

Pineconn

    Recipient of Ways

  • Members
  • Real Name:Mike
  • Location:Ohio

Posted 23 December 2014 - 08:15 PM

Mmm, 4-Frame. I think I have it set up the same as your enemy showcase test quest. The only difference is the walking type.

Might there be a fancy way to deplete Link's magic via scripting so that I can set the movement type to other? If not, I guess I'll just suck it up.

#4 Saffith

Saffith

    IPv7 user

  • Members

Posted 23 December 2014 - 09:42 PM

Huh. By any chance, does starting a new game fix it? All sorts of bizarre things happen when the global variables get messed up.

There isn't a way of draining magic from the script that's perfectly reliable. Specifically, you can't tell for certain whether the enemy actually hit Link.

#5 Pineconn

Pineconn

    Recipient of Ways

  • Members
  • Real Name:Mike
  • Location:Ohio

Posted 24 December 2014 - 02:39 PM

Didn't fix it.

Eh, I'm not really worried about it. I'll just use normal Bubbles to drain magic. Don't worry, though, I'm incorporating a number of your other enemy scripts (with proper credit, of course). :)

#6 Saffith

Saffith

    IPv7 user

  • Members

Posted 24 December 2014 - 04:10 PM

Still, I hate for stuff to break for no discernible reason. If nothing else, you could just use combo animation instead. You've probably done that for other enemies; just set up a combo with the animation and set misc. attribute 11 to the combo number.

#7 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 25 December 2014 - 05:50 AM

There isn't a way of draining magic from the script that's perfectly reliable. Specifically, you can't tell for certain whether the enemy actually hit Link.


You know, I know that enemy scripts are a long way off, but what about something simpler in the mean time? Specifically a script callback when a Link collision occurs. example: OnEnemyCollide(int enemy id). TBH, I can do this in 3 other embedded scripting languages but have no idea how to do this with ZScript (well, not in an un-overly complex way anyway...).

Another idea is to start storing important information--like collisions--each frame where scripts can access all that stuff via some Game->Stuff[] lookup. Of course this is a bit hackish too. hmm..

I'm just thinking out load I suppose.
  • Mero likes this

#8 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 December 2014 - 12:12 PM

Now I want to make a header that stores collisions each frame in a global array; what have you done Gleeok. >_<





Also tagged with one or more of these keywords: ghost, autoghost, wall bouncer

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users