-
Senior Member
velocity and comands problem
ok , ill keep that one short , i have a ball element which is start to rotate and move from on side of the screen , i want to make a script which will check its X position and if it will get to 200 make it stop ... i was trying for a several hours.. havent got to anything but a headec
this is the scrip i was trying
ball = element("ball")
switch (ball.x){
case 200 :
ball.velocity.x = 0
ball.acceleration.x = 0
break;
default :
ball = element("ball")
break;
}
Last edited by cyber reaper; 01-05-2005 at 02:46 PM.
ok....what ?
-
KoolMoves Moderator
Case is better suited when you have many options.
Better an If
code:
if (ball.x>=200){
ball.velocity.x=0
ball.acceleration.x=0
}
you need
ball=element("ball")
in your starting script
-
Senior Member
oh thank you bret , you saved me once again , thank god my partner is a scripter , however he's new at 3DFA so it will take him some time to get the concept and changes , but at list he got some clue about whats going on in those things
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|