Ok this may sound confusing but any help would be nice , i am currently working on an adventure game and you recieve coins from killing monsters , after you recieve an amount of coins u can buy stuff from a shop , in the shop their are spells and after u purchase a spell it tells u what key to press to use the spell. i need help on how i can make the spell only used after it is purchased. right now if someone knew what to press before buying it they could use this spell. please help me it is killing me and this project wouldnt be as good if people could cheat like that!
Offline
Make a list, and call it something like "Spells purchased". Then, make it so that when the project starts, all items in that list are deleted. I'm presuming you're using broadcasts when the spell is purchased, so put this:
When I receive "Spell1 purchased"
Add "Spell1" to "Spells purchased"
Then, if for example, to use the spell you needed to press the "a" key, you'd put this script:
When key "a" pressed
If "Spells purchased" contains "Spell1"
[Rest of script]
End if
That should work
Last edited by RedRocker227 (2012-01-13 10:38:53)
Offline
No problem
Offline