The Daily Click ::. Forums ::. Klik Coding Help ::. Mario-Style Powerup - Grow
 

Post Reply  Post Oekaki 
 

Posted By Message

Xx_Arekus_xX



Registered
  19/12/2008
Points
  2
20th December, 2008 at 21:20:59 -

Anyone know how to make a mario-style grow effect in a game that uses the PMO for player movement? Would I need two seperate objects? (Big and Small Player)... Player to enemy collisions while Big should make the player invincible for X amount of seconds and make him small again.... Any ideas? I'm lost.

Edited by Xx_Arekus_xX

 
n/a

traugott.simon



Registered
  23/08/2008
Points
  91
21st December, 2008 at 00:18:19 -

Well you should use two different objects. of course you can store everything in one, but that would be much more complicated to code.

When hit, just set an value to 20 or something and subtract 1 every 0.1 second. Within this period your player is invincible.

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
21st December, 2008 at 02:14:12 -

I'd only use one object for the movement, then simply paste the character graphic on top of it. That way you don't need to worry about switching which object is being controlled.

 
Craps, I'm an old man!

traugott.simon



Registered
  23/08/2008
Points
  91
21st December, 2008 at 11:49:02 -

As long as i am working with detectors in general, of course there should be an invisible player first.

But if this is not neccessary with the PMO, you can just rely every event to a group and put both (the small and the big) players in this group.

 
n/a

Xx_Arekus_xX



Registered
  19/12/2008
Points
  2
21st December, 2008 at 16:09:09 -

The alternate value thing should work like a charm. Thanks for that!... But how would I code it so that mario grows and shrinks using the 2 seperate objects? Would I have to make 1 Alt Value for each object (big and small) and then make it so that if Alt Value of Small = 1, deactivate a group of events that I place all of the big events in/set Alt Value of Big to 0 and activate the group of events pertaining to small and vice versa?

 
n/a

traugott.simon



Registered
  23/08/2008
Points
  91
21st December, 2008 at 23:47:49 -

Well there are many ways doing this.

Do the small and big marios have exactly the same behaviour or are there any differences?

If both are the same, just destroy the big mario when hit and create the small one on its place. Mayby via an animation. As long as both belong to the same group both will act the same way.

If both marios have different abilities you should of course code these parts different.

But theres no need to deactivate group of events.
Attention: eventgroups are not the same thing as objectgroups. i guess you know the difference, right?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click