Pokemon/Brawl Mash-up Help

Get help using Construct 2

Post » Wed Nov 23, 2011 5:14 am

I want to create a game with a similar overhead view as Pokemon Fire Red but platform battles like those in Super Smash Bros. I've tried creating tall grass with a custom list of Pokemon that could be encountered and then a Pokemon from that list is randomly chosen and goes to the brawl layout. Also this only happens after a certain amount of steps, I've tried to set it up so the more steps the more likely you will encounter a Pokemon.
Download by clicking "Download Original"

So how do I get my players chance of encountering a pokemon to increase the more steps he takes, and how do I make a random pokemon encounter selected from a list?AfterShock2011-11-23 05:16:42
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Wed Nov 23, 2011 10:07 am

Hmm I have some ideas of how to get this to work. You could use a 2d array to store the lists of pokemon and then make invisible sprites pick a row from the array (based on an instanced variable) and then randomly pick a pokemon from that list.

That's just a rough idea of how I'd do some it.

Bleh, actually I'll just try to make an example for you :)
B
14
G
3
Posts: 16
Reputation: 2,469

Post » Thu Nov 24, 2011 1:37 am

That's an easy one

[code]Global encounterChance = 0
Global maxChance = 10
tallGrassColl | On collision with Player Col
   System | encounterChance < maxChance -> add 1 to encounterChance
   System | random(maxChance) < encounterChance -> Go to Brawl[/code]

I think it makes more sense to start from 0 to go to maxChance...

so basically you will have encouterChance/maxChance ... Chance of encounter :DYann2011-11-24 01:39:55
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Nov 24, 2011 5:27 am

[QUOTE=Yann] That's an easy one

[code]Global encounterChance = 0
Global maxChance = 10
tallGrassColl | On collision with Player Col
   System | encounterChance < maxChance -> add 1 to encounterChance
   System | random(maxChance) < encounterChance -> Go to Brawl[/code]

I think it makes more sense to start from 0 to go to maxChance...

so basically you will have encouterChance/maxChance ... Chance of encounter :D[/QUOTE]
Thanks it worked!
But there is still the problem of having a select amount of Pokemon for each grass and randomly choosing from it.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Thu Nov 24, 2011 11:48 am

Many ways come to mind
Oh wait... No I can only see one way

1/ you put all your anim in the same sprite. You name your anim like that:
[code]PokemonName_RStanding
PokemonName_LStanding
PokemonName_RRunning
PokemonName_LRunning[/code]
(replace PokemonName by each of your pokemon.... name should match the list I will mention below)
2/ you create a global variable named "PokemonName" type text
3/ you create a global variable named "PokemonList" type text
4/ you keep a .txt file with you with the list of your pokemon (for easy management)
[code]pikachu
psychokwak
dracofeu
smogogo
...[/code](yes I know... french version)
Brawl event sheet :
5/
[code]start of layout
        -> set PokemonList to (and you copy/paste your list)
        -> set PokemonName to tokenat(PokemonList,int(random(tokencount(PokemonList,newline))),newline)[/code]

6/ you prefix all your animationName call with PokemonNam&"_
like :
[code]set animation to PokemonName&"_RStanding"[/code]
It should work fine (:

The idea is to use a string which contain a the list and use the indexation capabilities of the tokenat(string,index,separator) function
The separator is the newline special word which detect... new lines :D

Neat stuff... I should write a tuto on that... (actually I started one some weeks ago an... well... lazy :D)Yann2011-11-24 11:53:18
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Dec 03, 2011 6:15 am

Will not let me "Download Original" just gives me this error -->

Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.HRA2011-12-11 19:13:53
B
32
S
11
G
5
Posts: 71
Reputation: 4,833


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests