ID:142564
 
Code:
actually when i click rest nothing happens >_>
seems that your proc works better >_>


<dm>
client/Move()
if(mob.frozen) return
..()

mob/var/frozen = 0


mob
var
resting = 0
verb
rest()
resting = 1
usr<<"<font color=White>You sit down to rest...</font>"
var/mob/M //that should fix it
if(istype(M,/mob/Male))
icon = 'rest.dmi'
icon_state = "rest"
usr.frozen=0
sleep(30)
usr<<"<font color=White>You finished resting</font>"
sleep(10)
usr<<"<font color=White>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'Base.dmi'
usr.frozen=1
if(istype(M,/mob/Female))
icon = 'rest.dmi'
icon_state = "restf"
usr.frozen=0
sleep(30)
usr<<"<font color=White>You finished resting</font>"
sleep(10)
usr<<"<font color=White>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseF.dmi'
usr.frozen=1
if(istype(M,/mob/Neuter))
icon = 'rest.dmi'
icon_state = "restn"
usr.frozen=0
sleep(30)
usr<<"<font color=White>You finished resting</font>"
sleep(10)
usr<<"<font color=White>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseN.dmi'
usr.frozen=1



Problem description:
ok, either i cant get the freeze proc to work or the rest verb wont work HELP
Add M = usr line under var/mob/M:
mob
var
resting = 0
verb
rest()
resting = 1
usr<<"<font color=White>You sit down to rest...</font>"
var/mob/M //that should fix it
M = usr
if(istype(M,/mob/Male))

also using font color=white is crazy :P on the white background you can't see text AND the black background's deafult text should be white ;P
In response to Kisioj
Ok, i got the rest verb to work now...
but now the freeze proc dont work...

client/Move()
if(mob.frozen) return
..()

mob/var/frozen = 0


mob
var
resting = 0
verb
rest()
resting = 1
usr<<"<font color=blue>You sit down to rest...</font>"
var/mob/M //that should fix it
M = usr
if(istype(M,/mob/Male))
icon = 'rest.dmi'
icon_state = "rest"
usr.frozen=0
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'Base.dmi'
usr.frozen=1
if(istype(M,/mob/Female))
icon = 'rest.dmi'
icon_state = "restf"
usr.frozen=0
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseF.dmi'
usr.frozen=1
if(istype(M,/mob/Neuter))
icon = 'rest.dmi'
icon_state = "restn"
usr.frozen=0
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseN.dmi'
usr.frozen=1
</dm
In response to RanEsu
Look everywhere in the code for where you work with the frozen var.

When you rest, what happens to frozen? When you are done resting, what happens to frozen?

And when you move, what is the value of frozen? Is that value considered true or false in the if proc? When happens when it is true? What happens when it is false? Is that what you really want?

If you don't know enough to answer the above questions, then you aren't really ready to develop a game. In that case, you should consider reading the zilia tutorials, every word of every explanation, and if any of it doesn't make sense, ask. Then read the DM Guide, all of it. And if anything doesn't make sense, ask. if that's too much effort to invest in your coding skills, then hire a coder in the classifieds section.
uh, a proc is like this:

mob/proc
this_is_a_proc()
//I can be run by alot of things.


a variable like frozen is:
mob/var
frozen=0
health=15


check your code. your saying in it that if frozen equals 1 or something, you cant move. check the rest code thoroughly. i think it's an oversight...
In response to Eternal Desire
Eternal Desire wrote:
uh, a proc is like this:

> mob/proc
> this_is_a_proc()
> //I can be run by alot of things.

a variable like frozen is:
> mob/var
> frozen=0
> health=15

check your code. your saying in it that if frozen equals 1 or something, you cant move. check the rest code thoroughly. i think it's an oversight...


isnt that what its suposed to be doing?? when frozen = 1 you cant move, when frozen = 0, you can??? O_o lol
In response to RanEsu
RanEsu wrote:
Eternal Desire wrote:
uh, a proc is like this:

> > mob/proc
> > this_is_a_proc()
> > //I can be run by alot of things.

a variable like frozen is:
> > mob/var
> > frozen=0
> > health=15

check your code. your saying in it that if frozen equals 1 or something, you cant move. check the rest code thoroughly. i think it's an oversight...


isnt that what its suposed to be doing?? when frozen = 1 you cant move, when frozen = 0, you can??? O_o lol

read the DM guide and the tutorials, you clearly dont know much about coding.
In response to Eternal Desire
T-T ive been insulted for asking some1 to help T-T

lol, but what else can i do? seriously >_> lol
In response to RanEsu
it isnt an insult.

the dm guide is long but, if you wanna make a game yourself (the coding yourself atleast...) it's pretty much your only choice.

BYOND is a cake-walk compared to some other languages.
In response to Eternal Desire
yea, i can agree with that, im really only codeing my game till i find a coder >_< lol
so do u know how i would make it work??
In response to RanEsu
yes, read the DM guide.
In response to Eternal Desire
Eternal Desire wrote:
yes, read the DM guide.


grrrr fine...
lol
In response to Traztx
mob
var
movable = 1
mob
Move() // the movement proc
if(movable==0)
return // stops the proc also means disallows them from movement
else
..() // meaning continue the movement

then whenever u want them to be frozen just make it usr.movable = 0
In response to SadoSoldier
That "return" should be "return 0", and that "..()" should be "return ..()". Move() needs to return properly to indicate success or failure.
In response to Traztx
Yea.. I Agree..
client/Move()
if(mob.frozen) return
..()

mob/var/frozen = 0

mob
var
resting = 0
verb
rest()
resting = 1
usr<<"<font color=blue>You sit down to rest...</font>"
if(istype(usr,/mob/Male))
icon = 'rest.dmi'
icon_state = "rest"
//usr.frozen=0
usr.frozen=1 //freeze!
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'Base.dmi'
//usr.frozen=1
usr.frozen=0 //you can go now..
if(istype(usr,/mob/Female))
icon = 'rest.dmi'
icon_state = "restf"
//usr.frozen=0
usr.frozen=1 //freeze!
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseF.dmi'
//usr.frozen=1
usr.frozen=0 //you can go now..
if(istype(usr,/mob/Neuter))
icon = 'rest.dmi'
icon_state = "restn"
//usr.frozen=0
usr.frozen=1 //freeze!
sleep(30)
usr<<"<font color=blue>You finished resting</font>"
sleep(10)
usr<<"<font color=blue>You stand up again</font>"
usr.HP=maxHP
resting = 0
icon = 'BaseN.dmi'
//usr.frozen=1
usr.frozen=0 //you can go now..
In response to RanEsu
Learning the guide and working through the tutorials is a matter of investing in yourself.

The benefits of developing *your* coding skills:
- you will be able to make games yourself
- you will be able to read and improve the work of others
- you will be able to tell if your coder gives you crap or not
- you will know the best way to explain what you want to your coder

It's not like having to chop wood over and over to become better at chopping wood. Coding involved looking at new stuff, doing new stuff. So there's no mental drudgery, but endless mental adventure.

So think of the difficult concepts as "bosses" that you are trying to defeat. Once you understand them, they will never pwn you again.