Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Tutorial help - Experience shards
« previous next »
  • Print
Pages: [1]

Author Topic: Tutorial help - Experience shards  (Read 6417 times)

Offline zuhane

  • Freakalicious
  • Leader
  • *
  • Posts: 2,192
  • Kill me
Tutorial help - Experience shards
« 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
Logged
Geese ruined my life.

https://soundcloud.com/tom-kingston-3/geese

Offline zuhane

  • Freakalicious
  • Leader
  • *
  • Posts: 2,192
  • Kill me
Re: Tutorial help - Experience shards
« Reply #1 on: February 15, 2010, 03:11:59 PM »
Shameless bump :(
Logged
Geese ruined my life.

https://soundcloud.com/tom-kingston-3/geese

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tutorial help - Experience shards
« Reply #2 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.

Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline zuhane

  • Freakalicious
  • Leader
  • *
  • Posts: 2,192
  • Kill me
Re: Tutorial help - Experience shards
« Reply #3 on: February 15, 2010, 06:22:51 PM »
Quote from: lucas_irineu 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

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

Quote from: Prpl_Mage on February 15, 2010, 04:07:54 PM
just reply with a "Que?" if you need a better explaination

I'll give it a try! Thanks a lot! :D
Logged
Geese ruined my life.

https://soundcloud.com/tom-kingston-3/geese

Offline HackersTotalMassLaser

  • Digital Artist
  • Leader
  • *
  • Posts: 2,055
  • I intercept logs....web not mine
Re: Tutorial help - Experience shards
« Reply #4 on: February 19, 2010, 01:31:02 AM »
Quote from: zuhane on February 15, 2010, 06:22:51 PM
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.
Logged
<br /><br />Ohayo gozaimasu! OAO<br />
<br />Check Game Thread

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: Tutorial help - Experience shards
« Reply #5 on: February 19, 2010, 01:44:41 AM »
I only really go through "recent unread topics".
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline HobomasterXXX

  • Your eyes. Are an ocean. Your breasts. Are also an ocean.
  • Leader
  • *
  • Posts: 2,700
Re: Tutorial help - Experience shards
« Reply #6 on: February 19, 2010, 07:10:51 AM »
Quote from: HackersTotalMassLaser on February 19, 2010, 01:31:02 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.
Logged

1:24 PM - [Razor]: I think
1:24 PM - [Razor]: I almost fell off my chair
1:24 PM - [Razor]: in anticipation for DICK

Offline zuhane

  • Freakalicious
  • Leader
  • *
  • Posts: 2,192
  • Kill me
Re: Tutorial help - Experience shards
« Reply #7 on: February 19, 2010, 10:48:35 AM »
Quote from: HackersTotalMassLaser on February 19, 2010, 01:31:02 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.
« Last Edit: February 19, 2010, 12:08:49 PM by zuhane »
Logged
Geese ruined my life.

https://soundcloud.com/tom-kingston-3/geese

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Tutorial help - Experience shards
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum