Added: 2 years ago
From: PivotyPivoty
Views: 8,419
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (53)

Sign In or Sign Up now to post a comment!
  • Seriously ! You Helped Lot of people including me. THank you very much! We are developing a game right now but of course its an amateur RPG game. Your videos helped us alot ! :) Thank you u posted these videos :)

  • i'm using an animated character who is not a circle. I have all of the movement down but how am i supposed to make it so he stops at walls

  • diagonal walls? 

  • I assure you, you understand none of that code you just wrote. Looks like you recorded half your screen and had the code pre-made.

  • @CrazehGamer 1st line: call upon the movie clip for a function 2nd line: distance from touching the wall 3rd line: if up arrow key is pressed 4th line: move the player up the Y axis by 10 5th line: rotate the player 180 degrees (facing up) 6th line: close function 1 //Repeats for other 3 keys 7th line: if player is hitting the wall with specified distance going down: 8th line: send the player in opposite direction //Repeats for up Don't you dare test my 6 years of scripting knowledge
  • @CrazehGamer And yes, I did use notes, take a good look at the timing of the video and the date of when it was made. Back in that day, i had to make the videos quick, so I paced through the coding because i simply did not have time. Hope this helped by the way

  • @CrazehGamer I mean really, I have coded so many things 10x more complex than this.

  • OMFG mine keeps saying

    "**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler MC_dude.onEnterFrame=function(­){

    Total ActionScript Errors: 1  Reported Errors: 1"

  • @kdizzletotheshizzle did you try to add a other } to it? because that happens to me alot and I found out a solution by adding a other bracket

  • I think the code is wrong. :L

  • ok first of all, you're going partially INTO the wall, so your collision detection is off.

    When an object encounters a wall, it should stop AT the wall, not go into it.

    The Radius needs to be changed. Either the height or width.

  • Comment removed

  • how do i do this with:

    a) Actionscript 3.0

    b) using the Accelerometer rather than arrow keys

  • u should change the radius to half the height or width of the movieclip if it is a square so that there is no overlapping with the wall

  • @TheRobin1232 wow. This is AS2. Not AS3. XD

  • @TheRobin1232 it's

    this._width/2

    that's correct

  • doesn't work, I get:

    Scene=Scene 1, layer=Layer 1, frame=1, Line 1 Statement must appear within on/onClipEvent handler

  • @brtausi Means you put the action on a player and the action doesn't start with like:

    onClipEvent(load){

    or

    onClipEvent(enterFrame){

  • @brtausi Okay, the action should put it on the frame. :)

  • Poor.

  • while (left side hits) { adjust accordingly

    }

    while (right side hits) { adjust accordingly

    } etc. etc.

    THis was EXACTLY the pseudo code I needed in my head to finish a project I'm working on. Found you through google.  Thanks a ton.

  • It sais it needs to be on a clipevent handler.

  • Isn't a very accurate technique for collision in my opinion.

    Contact me if you want the code for a simple yet accurate method.

  • @linkinpark9sc Hey man I would really want that code :) if you contact me I would be very greatfull :D

  • @Nebel305 Well it's included in the 2nd part of my turn based RPG tutorial on my channel.

  • u poop face tomato nose this didnt work at all

  • hey how would i have mutiple walls on this.

  • An invisible wall...

  • I couldn't stand this honestly, he keeps going back and fixing his code problem. I didn't learn how to use collision.

  • here im going to tell you the problem your all making just copy nd paste the action script in the description TO THE FRAMES action script not the person THE FRAMES!!

  • it doesnt work anyway.

  • Put code on Frame...

  • Hey it's me again. Since what you showed here didn't work for me i did it like this: onClipEvent (load) {

    speed = 7;

    radius=8;

    }

    onClipEvent (enterFrame) {

    if (Key.isDown(Key.LEFT)) {

    _x -= speed;

    _rotation = 90;

    (ect, ect..)

    But when i inserted the wall code, it didn't error, but nothing changed. Help plz?

  • @jordantiste If I'm right, change the while into if so that means you change it into an "if" statement.

  • OMG i'm so pissed off! There is only a small error when i do this! it says same as Adooproductions: Statement must appear within on/onClipEvent handler MC_dude.onEnterFrame=function( ){

    What is wrong?

    Could i do it differently?

  • @jordantiste on/OnClipEvent handler is just this.

    onClipEvent (onEnter) {

    and then enter code

    then close it all off with

    }

  • @jordantiste Put it on the frame. If you don't the flash will told you to put like onClipEvent(load) or onClipEvent(enterFrame) .

  • Comment removed

  • Comment removed

  • Comment removed

  • The bigger the radius the more sensitave the walls are. I figured that out without even watching the video or anything! Im smart! nice vid pivoty.

  • Does This Work On MacroMedia Flash MX?..

    Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on/onClipEvent handler MC_dude.onEnterFrame=function(­){

  • same problem here"""

  • gaaah same here -_-

  • it still penetrate to me!

  • Well, me too... I just find out how to solve the movement code... The wall code is still a mysterium XD

  • @Ad0oProductions Put the actionscript (code) on the frame.

  • Dosen't work for me for some reason..

    My character's instance name is char.

    My wall's instance name is ground, I changed MC_wall and MC_dude to my names..

    Please help

  • @trejk92 MC_dude is an instance name.

  • awsome tut! first

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more