PDA

View Full Version : Help with my Stick RPG


Darcy!
06-12-2005, 07:56 PM
Im making a game (im a begginner and a half (I think)) and it is called Stick Adventures. I want it so when you're in the house and theres no days left that it goes to the end screen and I know you have to use "if" but I've tried.Also I want it so when the time gets to 24:00 you cant do anything else

ABC123
06-12-2005, 08:40 PM
I'm sorry, I speak english.

Homakruz
06-12-2005, 09:06 PM
ummmm.....

if (days<= 0){
gotoandStop (your end frame)
}

Darcy!
06-12-2005, 09:20 PM
ummmm.....

if (days<= 0){
gotoandStop (your end frame)
}
it worked but i had to sleep to 0 days and then go out of the house then go back in

ABC123
06-12-2005, 09:39 PM
Then just put the same code in your outside area.

Darcy!
06-12-2005, 09:58 PM
Then just put the same code in your outside area.
then id need a code so that u cant sleep on 0 coz they could sleep to -1 and then go outside and not get to the end!
Edit : Except i want it so that u can put -1 to get unlimited
Edit 2 : I also want to know how to make it you cant buy stuff/train without enough money

Lui
06-13-2005, 12:06 AM
do u have code for hittest?

Darcy!
06-13-2005, 12:29 AM
do u have code for hittest?
No i havent put that in yet. Why?

Lui
06-13-2005, 01:45 AM
I need it to stop the stickfigure from going through walls -_-

Darcy!
06-13-2005, 02:00 AM
I need it to stop the stickfigure from going through walls -_-
Well use the search button! And anyway can someone please help me?????????????????? please

Lui
06-13-2005, 02:28 AM
Well use the search button! And anyway can someone please help me?????????????????? please
HA! lol you should use the search button too! your bloody Q has been answered billions of times!

ABC123
06-13-2005, 06:29 AM
then id need a code so that u cant sleep on 0 coz they could sleep to -1 and then go outside and not get to the end!
Edit : Except i want it so that u can put -1 to get unlimited
Edit 2 : I also want to know how to make it you cant buy stuff/train without enough money


Now I'm not amazing at actionscript, but I don't believe that should be possible with the code lui provided.


if (days<= 0){
gotoandStop (your end frame)
}

That means if it's 0 or less than 0 than it should automatically bring you to the end frame.

Homakruz
06-13-2005, 03:42 PM
Lui .... maybe u should search on google... thats how i developed my hittest ... and stop begging people for the code....

darc ...I put the code so that if you go to day less then 0 it will still take you to end game screen. But, to make it so you can't sleep when days = 0 put this code on the sleep button

on (release){
if (day == 0){
}else{
//your current button coding stuff here
}
}

i think that should work


to make it so you can't sleep

Darcy!
06-15-2005, 02:25 AM
Lui .... maybe u should search on google... thats how i developed my hittest ... and stop begging people for the code....

darc ...I put the code so that if you go to day less then 0 it will still take you to end game screen. But, to make it so you can't sleep when days = 0 put this code on the sleep button

on (release){
if (day == 0){
}else{
//your current button coding stuff here
}
}

i think that should work


to make it so you can't sleep
it still goes to -1 and stuff

Swas
06-15-2005, 09:45 AM
it still goes to -1 and stuff

on (release){
if (day > 0){
//normal code
}else{
//gotoAndPlay wherever
}
}

its pretty much the exact same method as above but reversed, this when ever its bigger than 0 it acts normally, if its at 0 or below then its does the other code, if this doesnt work its your code thats doing something wrong, not us.

Homakruz
06-15-2005, 09:45 PM
Yea my bad ... i wasn't thinking about that ... thanks swas for clearing my code up lol

Darcy!
06-16-2005, 04:14 AM
on (release){
if (day > 0){
//normal code
}else{
//gotoAndPlay wherever
}
}

its pretty much the exact same method as above but reversed, this when ever its bigger than 0 it acts normally, if its at 0 or below then its does the other code, if this doesnt work its your code thats doing something wrong, not us.
really sorry but i put it in and when i clic k the button it goes to the end then the setup screen!

Homakruz
06-16-2005, 08:53 AM
did you put a stop action on the end screen cause that would help

bluestriker
06-16-2005, 09:47 PM
If you don't know how to do that code, then I pity you, because it is one of the easiest codes in AS.

stop();

Swas
06-17-2005, 05:28 AM
never quoted myself before


if this doesnt work its your code thats doing something wrong, not us.

its something on in your .fla, from the sounds of things that code works so... update us on any other real problems.

Darcy!
06-17-2005, 05:51 AM
If you don't know how to do that code, then I pity you, because it is one of the easiest codes in AS.

stop();
I do know and the reason it didnt work because the code said gotoAndPlay and I needed gotoAndStop

Swas
06-17-2005, 06:06 AM
I do know and the reason it didnt work because the code said gotoAndPlay and I needed gotoAndStop

wrong, i gave you gotoAndPlay because if you want anything like statistics screens you need to say gotoAndPlay and put stop(); in the frame other wise the code doesnt get carried on. That makes no sense O well.

Darcy!
06-26-2005, 11:29 PM
I swear i've searched this but how do you do the health bar like they did in sprg and make the hpmax go up when the strength goes up and making the inventory pop up "LIKE THEY DO IN SPRG" because if you use visible its bad because its still there and you can click on the buttons. Also can you tell me how to come out of the building just outside the door?

Lui
06-26-2005, 11:53 PM
the pop up one is definetly easy, just make a movieclip.
in the first frame put:
stop();
next make a button on the as put
on (release){
gotoandstop(2);
}
now, make 1 more frame, on that frame also put the stop script there.
now, put your pop-up thingys where ever you want.
TA-DA!! a pop up thingy(I made it up on my mind, lol)

im not really sure with the health, but you should check the code tatorhead is using.
please search "health bar" on flash game dev.

also can we see a preview of your game?

OMG first time ive wrote a code without using flash!
i feel proud.

Hope that was usefull

Darcy!
06-26-2005, 11:55 PM
the pop up one is definetly easy, just make a movieclip.
in the first frame put:
stop();
next make a button on the as put
on (release){
gotoandstop(2);
}
now, make 1 more frame, on that frame also put the stop script there.
now, put your pop-up thingys where ever you want.

im not really sure with the health, but you should check the code tatorhead is using.
please search "health bar" on flash game dev.

OMG first time ive wrote a code without using flash!
i feel proud.

Hope that was usefull
i search health on flash game dev but only 2 things came up and like i edited how do you leave a building and end up outside the door

Lui
06-26-2005, 11:59 PM
well? did the pop-up thing work?

here's tatorhead's health code, just finish the whole thread and you'll understand whats happening(just adapt with it)
http://forums.xgenstudios.com/showthread.php?t=15995

Darcy!
06-27-2005, 12:05 AM
well? did the pop-up thing work?

here's tatorhead's health code, just finish the whole thread and you'll understand whats happening(just adapt with it)
http://forums.xgenstudios.com/showthread.php?t=15995
i was hoping one which just pops up and you can still see the background. anyways

Lui
06-27-2005, 12:08 AM
what do u mean, still see the backgrounds. do you want it transparent or something?

Darcy!
06-27-2005, 12:19 AM
what do u mean, still see the backgrounds. do you want it transparent or something?
no i mean you dont go to a frame it just pops up on top of the background and the health thing didnt help and can you please tell me the thing where you exit to outside the door

Lui
06-27-2005, 12:33 AM
oh well, its still a pop-up, ill search for it l8er. the health, i got no idea.
now exiting the door? is it like in srpg where when u hit the door you go to the outside of the building?

well all i know is its being done with actionscript, you should ask homakruz for exact right code but in my knowledge i only know this:

make your door a movie clip then add this to its action script:

onClipEvent(enterFrame){
if(this.hitTest(_root.INSTANCE NAME OF STICK)){
gotoandplay(THE FRAME YOU WANT TO JUMP TO);
}

well just change the words in capital and you'll be fine with this temporary one,*smiles*
*starts to search for pop-up scripts*

Darcy!
06-27-2005, 12:42 AM
oh well, its still a pop-up, ill search for it l8er. the health, i got no idea.
now exiting the door? is it like in srpg where when u hit the door you go to the outside of the building?

well all i know is its being done with actionscript, you should ask homakruz for exact right code but in my knowledge i only know this:

make your door a movie clip then add this to its action script:

onClipEvent(enterFrame){
if(this.hitTest(_root.INSTANCE NAME OF STICK)){
gotoandplay(THE FRAME YOU WANT TO JUMP TO);
}

well just change the words in capital and you'll be fine with this temporary one,*smiles*
*starts to search for pop-up scripts*

No!!! I mean when you click the leave button and you EXIT FROM the building you end up outside the door?

Lui
06-27-2005, 12:47 AM
why dont u just make frames where the stick is standing outside doors of the building? wouldnt that be more easier?

Darcy!
06-27-2005, 01:17 AM
why dont u just make frames where the stick is standing outside doors of the building? wouldnt that be more easier?
no it would be harder