I'm in the middle of making a game for my gcse coursework and I have a time variable.
I want to time variable to completely stop when the monster's health reaches 0.
Which bits of script do I need to perform this? Please help
Offline
I have to get off right now, so sorry for the brief answer:
if <(monster hp.) > (0)> change [timer v] by (1) wait (1) secs endI hope that this helps!
Last edited by ErnieParke (2012-09-13 06:48:48)
Offline
Thank you for your help, but it didn't work! anymore ideas??
Offline
[scratchblocks]
when gf clicked
if <(swamp monster's health) > 0 >
change [time] by 1
wait 1 secs
end
Offline
alighope123456 wrote:
Thank you for your help, but it didn't work!
anymore ideas??
![]()
Could you say how it didin't work?
Ex. It doesn't stop when the monster's hp is less then 0, ect...
Offline
alighope123456 wrote:
when gf clicked forever if <(swamp monster's health) > (0) > change [time v] by (1) wait (1) secs end
Fixed and added a forever block.
Last edited by ErnieParke (2012-09-13 07:06:56)
Offline
When the monsters hp reaches 0 the time is meant to stop but it doesn't, it just keeps counting down to 0 then says game over.
I need the time variable to hide and completely stop when monsters hp is 0
Offline
when gf clicked show variable [time v] set [time v] to [0] repeat until <(HP left) < (0.1)> wait (0.98) secs change [time v] by (1) end hide variable [time v] stop script
Last edited by jontmy00 (2012-09-13 07:11:58)
Offline
If you mean the time variable under "sensing", you can't stop that. The only control you have over it is resetting it. But you can store the time in a different variable.
when gf clicked set [health v] to (10) reset timer repeat until <not <(health) > (0)>> set [time_it_took v] to (timer) end
Offline
Thank you all very much for your help!!!! Its worked!!! THANK YOU!
Offline