The Daily Click ::. Forums ::. Klik Coding Help ::. stopped on mid-air (medusa head soul? lol)
 

Post Reply  Post Oekaki 
 

Posted By Message

zharkman



Registered
  01/03/2009
Points
  27
17th July, 2009 at 02:06:24 -

well i just made a little gun, where as when you shoot, it shoots the bullet and creates a bullet "leftover" (dunno its name rly), that dissapears in like... 5 seconds or so, i need help with this:
i gave the bullet leftover thing, a space ship movement so it falls in a increasing speed up to... 30 points i think, so far, no prob, the problem is, i want that, when 2 bullet leftovers collide with each other, stack on top of the other, it works if i do the "stop movement" command, but if 2 of them, hit in mid air, they stay there until they dissapear, i want it so they stack on top, but still be able to fall, any ideas?
thanks in advance

 
none

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
17th July, 2009 at 04:09:12 -

I believe what you mean by bullet "leftovers" is the bullet shells

Do this-

When "BulletShell" collides with the ground
-Create "GroundShell" at (0,0) "BulletShell" (inherit direction)
-Destroy "BulletShell"

When "BulletShell" collides with "GroundShell"
-Create "GroundShell" at (0,0) "BulletShell" (inherit direction)
-Destroy "BulletShell"

"BulletShell" = bullet "leftover"
"GroundShell" = seperate object that looks like bullet "leftover"

 
n/a

zharkman



Registered
  01/03/2009
Points
  27
17th July, 2009 at 07:09:26 -

ooo thx urban monk, also... i have a similar problem, i made the same thing, this time with blocks that each have a spread value
i made like 4 blocks (its the same block, just spreaded value a)
the 4 of them have 6 hp (i suppose to call it hp)
when i shoot them, i substract one, and make it look like something else (i tried using counters, but took a few options out of what i needed so i opted for active objects)
if i try what u said, how do i make it so when i change it for the new "ground ice block" to have the same hp and not get confused with the other blocks?
thnx for the bullet thing btw that works

 
none

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
17th July, 2009 at 17:47:33 -

Well if the blocks aren't using built-in movements you can always store the different images on different directions.

So then you could do this (assuming your directions range from 0-5 that contain the images)

"Bullet" Collides with "Block"
-Subtract 1 from "hp" of "Block"
-Set Direction Value of "Block" to (6-("hp" of "Block")) <- The "6-" at the beginning is assuming that at direction 0 the object has full hp.


To make the different images for this code to work open your "Block" objects animation editor then..
Image
...After all the images have been created the code should work!


IF for whatever reason you are using built-in movements there is another way to do this that's a bit harder, especially if you have animation, but I'll just wait and see if this works for you first!

 
n/a

zharkman



Registered
  01/03/2009
Points
  27
17th July, 2009 at 21:47:23 -

thankyou, ill start thinkering with this, one small question more, if its not much to ask, is there a way to make active object images? lets say, in the game, there is a sword, is there a way pplz can like.. edit the sword without being able to look at the code? kinda like.. drawn to life, u can draw and re draw the stuff (i dun mind if u dun do it In-game, but to be able to atleast)
is that possible?

 
none

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
17th July, 2009 at 22:35:21 -

you could try making all the objects you want to be editable external files. Png/BMP/gif/whatever and loading them with the picture/active picture object.

I think you would have to have a different picture for each frame of animation though so you would have to do a fair bit of coding just to make animations work correctly.

This way people can edit external files in order to change the way images look in game.

I haven't actually tried anything similar to this myself so there might be a better method.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
17th July, 2009 at 23:15:28 -

Yes, its possible. You can either use the draw object or use an active as the pen brush.

Then use the screen capture object to turn the final user drawing into a image file. Load that using active picture or similar

Short answer: yes it is possible.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click