Staredit Network

Staredit Network -> Concepts -> Bouncing Effect
Report, edit, etc...Posted by HolySin on 2005-09-29 at 00:29:57
Ever wonder how to get a good bounce effect in something like a square? I know my sister added this in a map of hers, can't remember what though, but I found it kind of interesting.
Basically, you have 4 units, preferrably, 4 DIFFERENT battle cruisers. You place them at the borders of a square area like this (ignore "."):

...x___
x|____|x
...x

Then, you have 4 different locations that constantly follow each unit. Then, the units on the side patrol down and up, and the units on the top and bottom patrol right and left. Add 4 more locations to the border of the square area. No, don't just make one giant location, you do something so the borders look like this:
_
|_|

But stretching out so there's no part of the border that isn't covered by any of the locations.

Now for the item that actually bounces. Imagine the item is within the box and it moves to the left (probably activited by a quick "always/order" trigger). Now it hits the left border, meaning it hit the left stretched location. This should make a trigger that looks like this:


Trigger
Description:
Make unit "bounce" off the left border.
Players:
¤ Owner of the "bouncing" unit.
Conditions:
¤ Bring(CurrentPlayer, AtLeast, 1, "Bouncing Unit", Left Border);
Actions:
¤ Order("Bouncing Unit", CurrentPlayer, Move, Left Border, Right Battle Cruiser);
¤ PreserveTrigger();


This will make the unit "bounce" off the left wall. Repeat this so that when the unit hits the right border, it goes to the left battle cruiser, top border to bottom battle cruiser, and bottom border to top battle cruiser. Make sure that the "bouncing unit" does not constantly follow a battle cruiser, but make it go to the are the battle cruiser was when the "bouncing unit" hit the border. Hypertriggers are recommended.

ADDITION:
I probably should have put this in tutorials...
Report, edit, etc...Posted by fishgold on 2005-09-29 at 00:46:42
So your bouncing effect is done without calculation of velocity of an object that hits the wall? Hmm, check out devilesk's "Coordinate Angle Zoning System". It's pretty amazing.

http://www.staredit.net/index.php?download=3717

PS: Actually I coudln't quite understand your method. o_O
Report, edit, etc...Posted by HolySin on 2005-09-29 at 00:48:53
I figured that my first post wouldn't be enough. Sadly though, I don't remember the name of the map with this method.
Report, edit, etc...Posted by Rantent on 2005-09-29 at 01:00:44
I was going to make the perfect bouncing system, with gravity and eveything, but have stopped production on the map for the winter. You can see the basic idea of the map Here
Report, edit, etc...Posted by MapUnprotector on 2005-09-29 at 21:20:31
Gravity would require a third dimension. In my map I only just have 2. It's more of like from an overhead aerial view so gravity wouldn't play that big of a part.

Though I think a game including 3 dimensions would be much more complex and have more depth.
Report, edit, etc...Posted by l)ark_13 on 2005-09-29 at 23:21:10
Well, its sorta a bouncing system...
It doesn't really apply to nature and reality though. Technaically you could never touch the bottom and the top too...

It is flawed but could be improved on. GJ (you and your sister)
Report, edit, etc...Posted by Rantent on 2005-10-01 at 00:47:42
QUOTE
Though I think a game including 3 dimensions would be much more complex and have more depth.
This gives me an idea... happy.gif
Report, edit, etc...Posted by HolySin on 2005-10-04 at 01:09:19
I merely just crappily explained it. wink.gif
My sister is the one who thought of this, I'm trying to figure out how to make it more realistic. tongue.gif
Report, edit, etc...Posted by MapUnprotector on 2005-10-04 at 01:14:30
I know this isn't what you were explaining, but legacy also created a bouncing method that had pretty much the same end result as mine, except he used mobile grids around the unit to control the direction the unit goes and how it bounces.
Report, edit, etc...Posted by HolySin on 2005-10-04 at 01:25:05
I'd probably would need to see the map since I'm mainly a visual learner, but it would have to wait until Friday. wink.gif
Report, edit, etc...Posted by scwizard on 2005-10-04 at 12:15:15
QUOTE(HolySin @ Sep 28 2005, 11:29 PM)
Ever wonder how to get a good bounce effect in something like a square? I know my sister added this in a map of hers, can't remember what though[right][snapback]323971[/snapback][/right]
OMG girls besides RexyRex make maps!!! tongue.gif
^ ignore ^

Anyway, it seems like a pretty good bouncing method, however it looks like in an actual map it would look pretty unrealistic. It seems that if you combine this with devilek's map, then it might work out really well.

I can't think of any uses for this though besides PONG (which has already been made, by Tux I think), and some kind of bouncy red ball defense.
Report, edit, etc...Posted by HolySin on 2005-10-04 at 20:15:29
A dodging game perhaps? wink.gif
Report, edit, etc...Posted by Zeph on 2005-10-08 at 22:08:03
Lol. Paul...

...x___
x|____|x
...x


xD wtF?
Next Page (1)