Ok so in my game I have a thing where you press X and two things come up to give something experience. My character runs over them initiating the experience. Then they hide. But I want it to not be re-used to give infinate experience so how do I stop the effects of the X button?
Last edited by imsosuperswell1 (2012-02-21 20:03:50)
Offline
whenclicked
setsprite works ▼to1foreverifSprite works=1wait untiltouchingsprite1 ▼?your script heresetsprite works ▼to2
Offline
Slayerrobe's script is relevant.
whenclicked
setexp ▼to0setexp_enabled ▼to1foreverifexp_enabled=1wait untiltouchingsprite1 ▼?changeexp ▼by1setexp_enabled ▼to0
Last edited by Magnie (2012-02-21 20:58:58)
Offline
Do you want me to actually show you the script I am trying to use but failed? I may can't cause I fail at the scratchblock thing.
Offline
imsosuperswell1 wrote:
Do you want me to actually show you the script I am trying to use but failed? I may can't cause I fail at the scratchblock thing.
The script does exactly what you want. The sprite that the character walks over, waits until the user walks over it, and then it gives 1 exp then it won't give anymore after that.
Last edited by Magnie (2012-02-21 21:05:57)
Offline
But the script is enabled by the X button which broadcasts Item, then the script initaites. So can you incorperate that into there?
Offline
How about that? You could also use this script:whenclicked
setbutton_pressed? ▼to1foreverifbutton_pressed?=1wait untiltouchingsprite1 ▼?broadcastItem ▼setbutton_pressed? ▼to0
And whenever you want to reactivate the button or deactivate, you can just set the button_pressed? variable to 0 to deactivate or 1 to activate.whenclicked
setbutton_pressed? ▼to1foreverifandbutton_pressed?=1touchingsprite1 ▼?broadcastItem ▼setbutton_pressed? ▼to0
Offline
No, I am not changing it being activated by the X button. If only I showed you the script so you could see. You know what join.me is? Its a site letting you see my screen, what time will you be on tomorrow? I will give you the link and you will see my screen and I will show you the screen.
Offline
Comments are broken, apparently.whenclicked
setbuttonpressed ▼to0This is so the button can be pressed the first time.foreverifkeyandx ▼pressed?buttonpressed=0broadcastshow the experience whatevers ▼setbuttonpressed ▼to1This stops the button from working in the future.
Last edited by videogame9 (2012-02-22 20:49:12)
Offline
imsosuperswell1 wrote:
No, I am not changing it being activated by the X button. If only I showed you the script so you could see. You know what join.me is? Its a site letting you see my screen, what time will you be on tomorrow? I will give you the link and you will see my screen and I will show you the screen.
Could you upload the project/script? I don't feel like installing new software, sorry.
Or could you explain exactly what you are trying to do? Do you want a one-time button? Cause the scripts we are giving are one-time buttons.
Offline
First of all, you need to explain it clearly.
"two THINGS (?!?!) pop up" what things? sprites? how do they give experience? if you want us to help you, you need to ask it clearly.
Don't ask 22+ and expect to get 4.
Secondly, viewers of join.me can view directly in the browser.
Third, you do realize you can just take a picture of your scripts, right?
Offline
kayybee wrote:
First of all, you need to explain it clearly.
"two THINGS (?!?!) pop up" what things? sprites? how do they give experience? if you want us to help you, you need to ask it clearly.
Don't ask 22+ and expect to get 4.
Secondly, viewers of join.me can view directly in the browser.
Third, you do realize you can just take a picture of your scripts, right?
Ah okay.
Also, basically what he's saying is the code of conduct: http://scratch.mit.edu/forums/viewtopic … 2#p1147782
Explain everything as clearly and detailed as possible.
Offline
Well guys I figured it out. I had to add the stop script to the activation script and it worked. Oh well, close it mods!
Offline