Jump to content

Photo

Moving sprites request.


  • Please log in to reply
44 replies to this topic

#16 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 April 2012 - 10:52 PM

It has been fixed. Updated script above ^^

#17 Jenny

Jenny

    Hero of Time

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

Posted 21 April 2012 - 11:00 PM

Okay, that sorta fixed the solid combo problem, but now it keeps getting stuck in random places, being unable to move...?

#18 tox_von

tox_von

    Zelda Addict

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

Posted 22 April 2012 - 01:31 AM

wouldnt some kind of random movement function like this be easier?

CODE
import "std.zh"

ffc script dogs
{
    void run()
    {
       int frames = 0;
       int a = 0;
      
       while(true)
       {
        a = Rand(2);
        frames ++;
        if (frames > 0 && frames < 20 && a == 0) this->X ++;
        if (frames > 0 && frames < 20 && a == 1) this->X --;
        if (frames > 20 && frames < 40 && a == 0) this->X --;
        if (frames > 20 && frames < 40 && a == 1) this->X ++;
        if (frames == 41) frames = 0;
        if (this->X > 256) this->X= 1;
        Waitframe();
       }
    }
}


#19 Shane

Shane

    💙

  • Moderators
  • Pronouns:He / Him
  • Location:South Australia

Posted 22 April 2012 - 01:39 AM

QUOTE(tox_von @ Apr 22 2012, 04:01 PM) View Post

wouldnt some kind of random movement function like this be easier?

CODE
import "std.zh"

ffc script dogs
{
    void run()
    {
       int frames = 0;
       int a = 0;
      
       while(true)
       {
        a = Rand(2);
        frames ++;
        if (frames > 0 && frames < 20 && a == 0) this->X ++;
        if (frames > 0 && frames < 20 && a == 1) this->X --;
        if (frames > 20 && frames < 40 && a == 0) this->X --;
        if (frames > 20 && frames < 40 && a == 1) this->X ++;
        if (frames == 41) frames = 0;
        if (this->X > 256) this->X= 1;
        Waitframe();
       }
    }
}



Have you tested and confirmed that this is issue-free? Also mind if you give us the information on what arguments are what?


#20 tox_von

tox_von

    Zelda Addict

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

Posted 22 April 2012 - 02:51 AM

all it does is skid around from left to right randomly. What i was suggesting was that movement like this would be easier than writing massive complicated scripts. What else would it need to do?

#21 Shane

Shane

    💙

  • Moderators
  • Pronouns:He / Him
  • Location:South Australia

Posted 22 April 2012 - 05:43 AM

That wasn't my question, I asked is it issue-free and what are the arguments given in this script, as I assume there will be arguments.

Left to right? Why not up and down too?

#22 tox_von

tox_von

    Zelda Addict

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

Posted 22 April 2012 - 08:02 AM

i dont think there can be anything wrong with my script other than its underdeveloped and can do more if anyone wants it to using the frame counter idea. All it does is put a ffc on the screen theres no collision stuff.

#23 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 22 April 2012 - 10:41 AM

There are no arguments, there is no solidity checking, there is no up/down movement. Easier =/= better.

#24 Jenny

Jenny

    Hero of Time

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

Posted 22 April 2012 - 05:09 PM

QUOTE(Dragonite @ Apr 22 2012, 12:00 AM) View Post

Okay, that sorta fixed the solid combo problem, but now it keeps getting stuck in random places, being unable to move...?



I can't use these when they keep on getting stuck icon_frown.gif

#25 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 22 April 2012 - 06:02 PM

What makes them get stuck? Can you tell?

Did you accidentally change those constants (starting with ANIMAL_ATTRIB_) again?

#26 Jenny

Jenny

    Hero of Time

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

Posted 22 April 2012 - 06:12 PM

No, I didn't change anything.

I think it has something to do with the hopping...

#27 Mero

Mero

    Touch Fluffy Tail

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

Posted 22 April 2012 - 06:17 PM

You're using ghost->Dir not Ghost_Dir. That's why it's getting stuck I think.

#28 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 22 April 2012 - 06:18 PM

That doesn't happen in my test. Try replacing your version with this (just in case):
Script


And if that doesn't work, list all of your animal's attributes.

Edited by MoscowModder, 22 April 2012 - 06:18 PM.


#29 Jenny

Jenny

    Hero of Time

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

Posted 22 April 2012 - 07:37 PM

1
60
90

#30 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 22 April 2012 - 07:39 PM

Maybe I should just take another look at the quest file.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users