The Daily Click ::. Forums ::. Klik Coding Help ::. Separate objects, separate values
 

Post Reply  Post Oekaki 
 

Posted By Message

Mr. Ksoft



Registered
  02/07/2005
Points
  125
24th March, 2006 at 22:41:41 -

OK, I'm working on an interesting little platformer where the main character has psychic powers. He can lift rocks, shoot lasers, etc.

The question here is about my method for making liftable rocks. I have my character shoot out invisible beams when he's in "psy-mode" and when they collide with a rock, the camera locks on to the rock, the player's movement is disabled, and the rock's movement engine is enabled, until you let go of button 2. The rock uses a simple static-movement engine. The problem is, I have their X momentum, Y momentum/Gravity, and 'Focused or Not' values as alterable values, and whenever I make more than one rock, the game goes crazy. One rock will fall through the floor, and the other will fly up into the air and off of the level. I cannot see what the heck is going on with it. I even tried spreading Alterable Values A,B,&C by their NObjects (as I assume it's supposed to be used?) and that didn't work.

I've also encountered a similar problem with my enemies, who use internal flags to determine what they're doing and alterable values to measure the time between their shots. With this, if I trigger one of them by walking into its line of sight, all of the enemies in the level start to fire.

I assume I'm doing something wrong that's easily fixed, but I'm sometime ignorant like that. Anyone know how to fix this?

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
24th March, 2006 at 23:23:07 -

I think you should spread a value between your rocks and then run a loop and on each loop commence that particular rock's movement.

Make sure you have spread value on it's own event, it is a very strange action and you cant put start loop in the same event. EG:

Always - Spread Value 0 in A

Always - Start loop "rock"

Not:
Always - Spread Value 0 in A
- Start loop "rock"

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
   

Post Reply



 



Advertisement

Worth A Click