Can an actor accelerate towards multiple points at once?
jb15
Member Posts: 602
Can an actor accelerate towards multiple points at once?
I don't want to give my idea away, but here's how I can explain it:
I want one actor (I'll call it "marble") that accelerates towards a different actor ("magnet"). I've figured out how to have it accelerate towards one magnet--at a speed determined by the distance between the two actors (so the closer it gets to the magnet, the more it accelerates--or is pulled in).
But can I have multiple "magnets"? If this doesn't make sense, please let me know. I'm a little confused myself...
I don't want to give my idea away, but here's how I can explain it:
I want one actor (I'll call it "marble") that accelerates towards a different actor ("magnet"). I've figured out how to have it accelerate towards one magnet--at a speed determined by the distance between the two actors (so the closer it gets to the magnet, the more it accelerates--or is pulled in).
But can I have multiple "magnets"? If this doesn't make sense, please let me know. I'm a little confused myself...
Comments
ps. marbles generally aren't magnetic
How you update / change that point is up to you
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
How can we contact one another? You're "NEED HELP WITH YOUR PROJECTS? CLICK HERE" link is broken.
you'll see that the actor is affected by both accelerate behaviors at the same time.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
so jon I would definitely like to see what you got when you decide to release it.
tenrdrmer(at)yahoo.com
___________________________________________________________________________________
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
EDIT: Is that the "VectorToAngle(x , y) thing?
You want vectorToAngle(self.position.x-game.Target.x,Self.position.y-game.target.y)
The only way I can achieve the desired effect is to use 1 "change velocity" and 1 "accelerate towards."
EDIT: Actually, it's not exactly the perfect effect, becuase one of the "forces" of the magnet is constant--100. I need it to be a variable--relating to the distance of the marble from the magnet (the closer the two are, the stronger the force).
This is great for two magnets, but what about if I need more?
___________________________________________________________________________________
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
Maybe I've already gotten as much information as I can here (You've all been VERY helpful)--but if someone does know how I would do this (or have a good guess), I would really appreciate knowing their thoughts.
http://www.youtube.com/user/GameSaladCookbook/#p/search/0/_p2s61XVZ0o
shows you how to set up distance between...once that works you can set up an velocity towards the co-ordinates of the points - set up two individual rules
I'm trying to make a game kind of like this one:
http://www.unit9.com/app/warp/
Only I want the rocks/asteroids to be affected by MULTIPLE (at least 2-3) "gravity wells" (that's what their called in W.A.R.P.) at the SAME TIME.
At this point, I'd be happy to pay (I have a PayPal account) for someone to make a template/example/work me through the process of doing what I'm trying to do. If you offer mathematical services, please let me know. I haven't been able to contact anyone yet--broken links.
if you know the distances set it so that once an actor falls into that distance accelerate towards the actor...
EDIT: ok im working on something in my own template for you
after an intro to show u what the rules are usually like in my game i have two warps, one approaches faster then the other (my game is a running game - but it shows the warps working) - then next is both very close and u can see the player hovers between.
Is this sort of what u were looking for?
Template thread: - will be busy for a bit!
http://gamesalad.com/forums/topic.php?id=21417