User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12

Thread: Script Link's movement

  1. #11
    Robots in Disguise
    ZC Developer
    Dark Nation's Avatar
    Join Date
    Mar 2000
    Posts
    5,401
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,662
    Level
    26
    vBActivity - Bars
    Lv. Percent
    62.37%

    Re: Script Link's movement

    For instance,
    Code:
     SETV inputsenabled,0
     SETV d0,60
     SETV forcedright,1
    HERE WAITFRAME
     SUBV d0,1
     COMPAREV d0,0
     GOTOMORE HERE
     SETV inputsenabled,1
     QUIT
    would cause Link to walk to the right 5 tiles (there's 12 steps between tiles) and the player couldn't do anything about it. (nam)

  2. #12
    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,855
    Level
    25
    vBActivity - Bars
    Lv. Percent
    38.36%

    Re: Script Link's movement

    Instead of a "forcedright" variable, how about "leftbutton" and "rightbutton" variables that are TRUE if the player is pressing that button, but can be SETV TRUE by the script?

    Code:
    WAIT WAITFRAME
     SETV leftbutton,0; discard the player's input.
     SETV upbutton,0; discard the player's input.
     SETV downbutton,0; discard the player's input.
     SETV rightbutton,1; make Link walk right.
    GOTO WAIT
    EDIT: Actually, I think you should just make a variable, "button" which contains a bitfield (is that what it's called?) for each of the buttons.

    up = 1
    down = 2
    left = 4
    right = 8
    A = 16
    B = 32

    So then we could just do "SETV button,8" to go east, "SETV button,9" to go northeast, and "SETV button,22" to throw the boomerang southeast (if it was in the A button slot.)

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