A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Help on some probably easy scripting

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    10

    Question

    Hi, i am wanting to make a game on Flash 4. So far i
    am able to move the robot around the screen using
    direcsionall buttons. What i would like to know is if
    it is poosssible and how if the robot goes over
    anouther robot and the person presses the space bar it
    could load to anouther screen or take a life off the
    other robot. Could you give me the coding please eg.
    tell target and then what you write in detail please
    as i am a new beginer , Thanks. Also if it is not to
    much trouble i was woundering if you could tell me how
    the computer could move around a robot and attack the
    persons robot. If you cant help is it possible you
    could direct me to someone who can, thanks once again

    Bertie Stephens

    PS could you e-mail me futher help at bert180@yahoo.co.uk, Thanks

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    170

    Post Use GetProperty

    assume that the user controlled robo's instance names is
    "robo1" and suppose another computer controlled robo's names is "robo2".

    Create a keyframe with name "objeck check"
    Code to put in it :

    If(/robo1:_x = robo1:_x)
    TellTarget("Name of the movie clip you want to play)
    Goto and Play|(frame number)
    End TellTarget
    Endif

    If it dosen't work out aske me or drope a line




  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    170

    Post TRy this

    So that didn't work out. Actually I forgot Flash calculates position from the centre.

    Observe this example that I have made. There are two rectangles or width 66. so there midpoint is in terms of width is 33.

    http://www7.ewebcity.com/shiningstar/movie1.swf

    If the link for downloading the fla dosen't work from there use http://www7.ewebcity.com/shiningstar/movie1.zip


    The name of the clips I have used are <b>a</b> and <b>b</b>

    An invisible button traces the actions.

    On (Key: <Right>)
    Set Property ("/a", X Position) = GetProperty("/a",_x)+5
    End On
    On (Key: <Space>)
    If (GetProperty("/a",_x)+33 >= GetProperty("/b",_x)-33 and GetProperty("/a",_x)- GetProperty("/b",_x) <=66 )
    Go to and Stop (3)
    End If
    End On


    Hope this helps you out
    Still facing problems. Never be afraid to ask questions.

    [Edited by Puneet on 08-05-2000 at 08:42 PM]

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    10
    Hi guys,

    Sorry for the delay in responding back on this, but thanks for your help! I'm still having trouble getting this to work, despite trying.

    It seems there's not much support on the world wide web for this? I wish Macromedia would keep things stable! Annoyingly they've also stopped broadcasting Robot Wars now which this was based on. How is one meant to develop anything when things change so often? grrr *calms down*

    Puneet - on: GetProperty("/a",_x)+5 - why is it of factor 5?

    I'm also thinking of upgrading my Mac Wallstreet if anyone has anytips i'd be willing to go into a Chat Room or receive a fax. I'll page through my number to anyone.

    Cheers for the help

    Bertie

    ** Now listening to Eminem: Real Slim Shady on Napster **

  5. #5
    Senior Member
    Join Date
    Aug 2012
    Posts
    115
    Hola

    I have been a waiting for you to reply to this Bertie, we are the use . syntax code now too.

    what is the scope problemmo you are have? where is you code ??

  6. #6
    Junior Member
    Join Date
    Jan 2013
    Posts
    3
    The problem is SVN was released after I had asked this question. And in the mean time, I opened an email with the title "I love you" and everything was lost.

  7. #7
    Junior Member
    Join Date
    Jan 2013
    Posts
    1
    Change so often? I'm sorry, but it seems every time you sleep, you time travel by 5-15 year intervals. Macromedia was purchased by Adobe more than 7 years ago. You might want to try this new thing called "Flash 11" as it is more flexible than "Macromedia Flash 4"

  8. #8
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    I look forward to the update from you in years to come Bert

  9. #9
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Let me know if you ever manage to solve your problem. I've been eagerly awaiting the appropriate response!

    Kind regards,
    -Yanoflies

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center