Water
Dictator_of_Earth
Member Posts: 11
How would you be able to make water in Gamesalad? So whenever you click on a button the lower half of the game fills with water. And, when the player touches the water they animate like they are swimming and slow down. Also, the player won't won't be able to move up outside of the water but in water can move in any direction.
Comments
I have a couple of ideas on how to do this, let's see if it works.
Note: I actually spent a lot of time writing this out, but I felt you deserved an answer just like I want people to help me with my problems. Here you go, and I hope this works! I didn't try out the whole thing, just parts I doubted.
If there is a number/letter before a "." then that is a rule.
Actors Needed:
Player
Water
Water Edge
Touch Area
Attributes (For whole game) Needed:
InWater (Boolean, False)
Player: Your main character.
Attributes:
Add "Speed" (Real, Set to whatever normal speed you want)
Change Bounciness (and possibly friction and density if this doesn't work, but you shouldn't have to) to False
Rules:
.1. When "W" is pressed:
Move at 90° Speed: "Self.Speed"
a. If "InWater" = "True"
Animate (Your special swimming animation)
.2. When "A" is pressed:
Move at 180° Speed: "Self.Speed"
a. If "InWater" = "True"
Animate (Your special swimming animation)
.3. When "S" is pressed:
Move at 270° Speed: "Self.Speed"
a. If "InWater" = "True"
Animate (Your special swimming animation)
.4. When "D" is pressed:
Move at 0° Speed: "Self.Speed"
a. If "InWater" = "True"
Animate (Your special swimming animation)
.5. When "InWater" = "True"
Change Attribute "Self.Speed" to (Whatever speed that is slower than normal speed)
Collide with actor of type: "Water Edge"
Touch Area: The bottom half of your screen.
Rules:
.1. When "Touch" is "Pressed"
Spawn Actor "Water" at -> ^ [-(wherever you want the water to be)]
Spawn Actor "Water Edge" at -> ^ [-(right above wherever you want the water)]
Water: The...er... water .
Rules:
.1. When "Overlaps or collides" with actor of type "Player"
Change Attribute "InWater" to "True"
Water Edge: Makes sure your player doesn't leave the water.
.
Attributes:
Change the "Movable" boolean in physics to false.
Change Bounciness to False
and to make the scene fill with water, make the water actor a circular collision, and make the graphics on the water drops change after colliding with another water drop, after a 1 second delay.