User Tag List

Results 1 to 5 of 5

Thread: The first "Hey guys what's wrong with my script" topic

  1. #1
    Developer
    ZC Developer

    Join Date
    Aug 2006
    Location
    Australia
    Age
    37
    Posts
    2,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,853
    Level
    25
    vBActivity - Bars
    Lv. Percent
    37.99%

    The first "Hey guys what's wrong with my script" topic

    Hey guys, can you help me find out what's wrong with this script?
    Code:
    WAIT WAITFRAME
     COMPARER lx,x
     GOTOLESS A
     COMPAREV xd,0.5
     GOTOMORE MORE
     ADDV xd,0.1
    MORE COMPARER ly,y
     GOTOLESS B
     COMPAREV yd,0.5
     GOTOMORE WAIT
     ADDV yd,0.1
     GOTO WAIT
    A COMPAREV xd,-0.5
     GOTOLESS MORE
     SUBV xd,0.1
     GOTO WAIT
    B COMPAREV yd,-0.5
     GOTOLESS WAIT
     SUBV yd,0.1
     GOTO WAIT
    It's supposed to provide a different kind of homing capability to an FFC, using speed instead of position, and with upper and lower caps on both speed values. Just attach it to an FFC yourself and see how it goes wrong, then maybe tell me what the problem is.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.37%

    Re: The first "Hey guys what's wrong with my script" topic

    The only error I see is that you put the wrong thing to GOTO in one line in part A.
    Code:
    A COMPAREV xd,-0.5
     GOTOLESS MORE
     SUBV xd,0.1
     GOTO WAIT
    should be
    Code:
    A COMPAREV xd,-0.5
     GOTOLESS MORE
     SUBV xd,0.1
     GOTO MORE
    At least, I assume that was the idea.

    The reason the script is failing so badly, though, is not your fault. The game just isn't handling the decimals very well. Remove them, like so:
    Code:
    WAIT WAITFRAME
     COMPARER lx,x
     GOTOLESS A
     COMPAREV xd,5
     GOTOMORE MORE
     ADDV xd,1
    MORE COMPARER ly,y
     GOTOLESS B
     COMPAREV yd,5
     GOTOMORE WAIT
     ADDV yd,1
     GOTO WAIT
    A COMPAREV xd,-5
     GOTOLESS MORE
     SUBV xd,1
     GOTO MORE
    B COMPAREV yd,-5
     GOTOLESS WAIT
     SUBV yd,1
     GOTO WAIT
    ... And it'll work just fine, albeit much too fast.
    Perhaps you could get around it by using data registers instead of xd and yd and dividing by ten when you update the position.

  3. #3
    Developer
    ZC Developer

    Join Date
    Aug 2006
    Location
    Australia
    Age
    37
    Posts
    2,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,853
    Level
    25
    vBActivity - Bars
    Lv. Percent
    37.99%

    Re: The first "Hey guys what's wrong with my script" topic

    Quote Originally Posted by Saffith View Post
    The reason the script is failing so badly, though, is not your fault. The game just isn't handling the decimals very well.
    Hmm... it seems you're right.

  4. #4
    On top of the world ShadowTiger's Avatar
    Join Date
    Jun 2002
    Location
    Southeastern New York
    Posts
    12,231
    Mentioned
    31 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    29,581
    Level
    46
    vBActivity - Bars
    Lv. Percent
    60.47%
    Achievements It's over 9000!

    Re: The first "Hey guys what's wrong with my script" topic

    It seems to be one of the errors ZC has with Freeform Combos as a whole, actually. ZC really doesn't like decimals. Not much at all. Particularly when combined with negatives.

  5. #5
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,030
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.72%

    Re: The first "Hey guys what's wrong with my script" topic

    Can anyone isolate the single command that isn't working as expected?

    Moved to Beta Bugs forum.

    EDIT: n/m, already done

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social