Jump to content

Photo

Moving sprites request.


  • Please log in to reply
44 replies to this topic

#1 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 20 April 2012 - 10:46 PM

So, I'm making a quest, and wanted to make cuccos, dogs, and butterflies move around instead of standing still.

Dogs and cuccos should just hop around randomly.

Butterflies should fly around in a circle.

Any help would really be appreciated! icon_smile.gif

#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 01:13 AM

For butterflies, use the circular motion script in the DB.

For dogs and cuccus, try making an enemy that does little or no damage.

#3 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 01:34 AM

I don't very much want to make the dogs and cuccos enemies, it would look odd.

#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 02:06 AM

Okay, I bet someone could come up with an FFC script for that. Just make it move in a random direction each frame (changing directions every random number of frames) and hop (set NPC->Jump, maybe) at random intervals - it could use an npc (enemy) but without collision detection.

(This description is to help whoever writes the script)

#5 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 21 April 2012 - 05:20 AM

moving stuff around can be done like this what else did you need it to do?

CODE
import "std.zh"

int frames = 0;

ffc script new_script
{
    void run()
    {
    
       while(true)
       {
        frames ++;
        if (frames > 0 && frames < 5) this->X ++;
        if (frames > 5 && frames < 10) this->Y ++;
        if (frames > 10 && frames < 15) this->X --;
        if (frames > 15 && frames < 20) this->Y --;
        if (frames > 21 && frames < 30) this->X ++;
        if (frames == 31) frames = 0;
        if (this->X > 256) this->X= 1;
        Waitframe();
       }
    }
}


#6 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 10:07 AM

Tox, remember all those times I told you NOT to use global variables unless you had a very good reason to? How global variables are shared by ALL scripts and saved with the player's game save? It's REALLY, REALLY easy to convert them to local variables, like so:
Better script


In the meantime, I'm trying to come up with a better solution, but I'm having problems with it.

Edited by MoscowModder, 21 April 2012 - 10:07 AM.


#7 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 01:38 PM

I would like dogs and cuccos to behave as they do in Link's Awakening, hopping around randomly (without being able to be killed, of course)


Edited by Dragonite, 21 April 2012 - 01:43 PM.


#8 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 03:17 PM

Okay, that video helped immensely.

Here's your script (requires string.zh and ghost.zh to run).
LA Animals script


Setup: Create each animal as a Walking Enemy type, and set its attributes as listed in the code. Since you want them to be intangible (can't give or take damage), leave the collision detection parameter at 0.

These animals might wander off the screen if you let them. If you don't want that to happen, I can try to figure out a fix. Fixed!

Edited by MoscowModder, 21 April 2012 - 10:41 PM.


#9 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 05:21 PM

When I go onto the screen with the animals, it doesn't use the right combo and ZC crashes...

#10 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 06:10 PM

What combo did you set for Misc Attribute 11?

#11 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 07:43 PM

Combo 4904, I also edited the ghost.zh file to that too.

EDIT: Still not working, I looked at the test quest and I did everything the same way... icon_frown.gif

#12 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 08:21 PM

We got it solved in chat. Anyone who wants to use this script is welcome to it.

Remember to set attribute 11 to GH_INVISIBLE_COMBO (from ghost.zh)!

#13 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 10:41 PM

I have another problem, when going up-left, it uses the right facing sprites, and when going up-right, it uses the left facing sprites.

Not trying to sound needy, but is there anyway to fix this?

#14 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 10:43 PM

Directional sprites work fine for me... make sure you have n tiles pointing up, down, left, and right on the tilesheet, in that order, where n is the number of frames in the animation.

#15 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 21 April 2012 - 10:45 PM

That made up down and down up.
Still having the same problem as before.

Now is there a way to fix the "walking through solid combos" issue?

Edited by Dragonite, 21 April 2012 - 10:46 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users