Charas-Project

Game Creation => Requests => Tutorials => Topic started by: zuhane on February 15, 2010, 11:27:30 AM

Title: Tutorial help - Experience shards
Post by: zuhane on February 15, 2010, 11:27:30 AM
HALLO! So, I was thinking of making my game so that when an enemy dies, it explodes into shards of EXP and money.

Easy enough.

However, is there no quicker way than making a switch for every single shard of EXP that makes them disappear after collection?
The problem is, the menu takes you away from your current map, meaning people could exploit if I just used "Erase Event". If there a
quicker way, or do I just have to suffer and make 400 switches? :p
Title: Re: Tutorial help - Experience shards
Post by: zuhane on February 15, 2010, 03:11:59 PM
Shameless bump :(
Title: Re: Tutorial help - Experience shards
Post by: ellie-is on February 15, 2010, 04:07:54 PM
Dude. 4 hours. Thats not even enough time for half the active members to even see the thread. :P
Title: Re: Tutorial help - Experience shards
Post by: Prpl_Mage on February 15, 2010, 06:02:07 PM
Hmm, brain time.

Let's create one variable.

When you pick exp up, you erase the event and increase the variable by 1.
And if the player enters and exits the menu you have pages on the exp shards( first shard checks for 1, second for 2 and so on.).
Erhm...
Well...

Maybe got a bit hasty there.

Let's say that the enemy drops 5 shards, each worth 5 exp(I suggest using different sized shards for a set amount rather than 150 small shards for 150 exp. except for bosses, you want a huge explosion when bosses die).

So, enemy dies, spawn the 5 shards.
When you walk on them:
add exp: 5
VAR OP: [exp shards] add 1.
erase event.

Same for all the shards.

Then on a second page you add another precondition(gonna assume you use a switch for when the shards spawn). This precondition is: varaible[exp shard] is lower than or equal to: {number}

shard number 1 got the precondition: "equal to or lower than 1" and number 2 got "equal to or lower than 2" and so on.

So even if they enter the menu(maybe you should use a switch for the entering and exiting of the menu though) and return - the amount shards present will be the ones passing the variable check.
So if you picked up 2 shards: 2 of the shards will NOT appear.

They might not be in the right order and all when you return but it could be the solution to your problem.

just reply with a "Que?" if you need a better explaination, I'm kinda hungry and want to go back down to the PS3 to play DMC4.

Title: Re: Tutorial help - Experience shards
Post by: zuhane on February 15, 2010, 06:22:51 PM
Dude. 4 hours. Thats not even enough time for half the active members to even see the thread. :P

I was just so scared of it being bumped off the front page :(

just reply with a "Que?" if you need a better explaination

I'll give it a try! Thanks a lot! :D
Title: Re: Tutorial help - Experience shards
Post by: HackersTotalMassLaser on February 19, 2010, 01:31:02 AM
I was just so scared of it being bumped off the front page :(

I think it'd be sad if current active forum people only visited threads thru the main page.
Title: Re: Tutorial help - Experience shards
Post by: fruckert on February 19, 2010, 01:44:41 AM
I only really go through "recent unread topics".
Title: Re: Tutorial help - Experience shards
Post by: HobomasterXXX on February 19, 2010, 07:10:51 AM
I think it'd be sad if current active forum people only visited threads thru the main page.
I do. I only use, what, three forum sections? So "Recent Unread Topics" is useless to me.
Title: Re: Tutorial help - Experience shards
Post by: zuhane on February 19, 2010, 10:48:35 AM
I think it'd be sad if current active forum people only visited threads thru the main page.

But still, you must have realised how terrified I was at the time.