ID:167123
 
    Captain_guard
icon = 'person.dmi'
icon_state = "Captain of the Guards"
verb
Talk()
set src in oview(1)
usr <<"Captain of the Guards:You must talk to your father."



Father
icon = 'person.dmi'
icon_state = "father"
verb
Talk()
set src in oview(1)
usr <<"Your Father:My Son, I feel i must leave you, You will be man of the house, Watch over your mother for me, I leave you this gold, Goodbye Son."
sleep(20)
del(src)


now i want the captain guard to be moved only after the father is deleated, how do i do that?
Just make a proc() that makes the guard move and call it when the father is deleted.


-Doh
In response to XxDohxX
i dont know how :-(
In response to VolksBlade
Here is an example:

proc
MoveGuard()
//do stuff here
mob
Father
icon = 'person.dmi'
icon_state = "father"
verb
Talk()
set src in oview(1)
usr <<"Your Father:My Son, I feel i must leave you, You will be man of the house, Watch over your mother for me, I leave you this gold, Goodbye Son."
sleep(20)
del(src)
MoveGuard()


Doh
In response to XxDohxX
proc
Captain_guard()
loc = locate(1,1,1)

?
In response to VolksBlade
Well, you would need to locate the Captain Guard. So do a for loop, and find which mob you want, then call mob.loc = locate(1,1,1).

-Doh
In response to XxDohxX
error mob.loc undefined var
In response to VolksBlade
You have to do a for() loop. What I would do is use the tag variable and locate that tag on the mob. Look up tag. It may not be the best way but its logical. Also look up for() loops.


-Doh
In response to XxDohxX
O.o do you always have to sound that technical?
In response to VolksBlade
for(var/mob/Guard_Captain/M in world)//for that guy in the world, assuming there's only one if not change to view(usr)
M.loc = locate(1,1,1)


You can also have it walk to the player to make it seem normal.
In response to Pyro_dragons
umm is this hpw it's supposed to be done?
proc
Captain_guard()
for(var/mob/Captain_guard/M in world)
mob.loc = locate(1,1,1)
In response to VolksBlade
VolksBlade wrote:
umm is this hpw it's supposed to be done?
> proc
> Captain_guard()
> for(var/mob/Captain_guard/M in world)
> mob.loc = locate(1,1,1)
>


You calling var/mob/Captain_guard/M so

mob.loc = locate(1,1,1) -- mob should be M :)
In response to A.T.H.K
*yells* YESSSSS ThankYou Each Aand Every One Of You Who Helped Me, I Couldent Have Done It Without You All!
In response to VolksBlade
Lol calm down mate
In response to A.T.H.K
new problem, it didnt work
In response to VolksBlade
proc
Captain_guard()
for(var/mob/Captain_guard/M in world)
M.loc = locate(1,1,1)


ok you see the code. well for the father i have this

Father
icon = 'person.dmi'
icon_state = "father"
verb
Talk()
set src in oview(1)
usr <<"Your Father:My Son, I feel i must leave you, You will be man of the house, Watch over your mother for me, I leave you this gold, Goodbye Son."
sleep(20)
del(src)
Captain_guard()


now after i talk to the father, the guard dont teleport away
In response to VolksBlade
Try changing

del(src)
Captain_guard()

to

Captain_guard()
del(src)
In response to A.T.H.K
THANK YOU!!!!!!!!, now i need it where regular guards walk around randomly and attack monster's in veiw...can you do that with these codings, and after the father has dies and the guard has moved, them not say that to you but another message like "stay safe" or something like that?
guard
icon = 'person.dmi'
icon_state = "Guard"
verb
Talk()
set src in oview(1)
usr <<"The Guard:Your Father Has Been Injured, He Wish's For You To See Him."

mob
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck(M)
if (HP <= 0)
world << "[src] dies!"
del(src) //delete whatever just died

plus can you add exp and maxexp?
mob
proc
Levelup()
if(src.exp>=src.maxexp)//If your exp var equals, or passes your maxexp var
src.level++//Add to your level
src.exp=0//resets your exp to 0
src.maxexp*=1//makes your maxexp not double
src<<"You gained a level!"
src.Statup()
else
..()//defaults if the if() doesn't return it's arguments
mob
proc
Statup()
src.mHP+=20//adds to your health
src.HP=src.mHP
src<<"Your stats increase!"//Outputs a message telling you that you gained stats

In response to VolksBlade
mob/proc/move()
var/mob/M
while(src)
var/player_found = 0
for(M in oview(3,src))
if(M.client)
step_towards(src,M)
player_found = 1
break
if(player_found != 1)
step_rand(src)
sleep(10)
sleep(5)


        Demon
New()
spawn()
move()
Bump(mob/M)
if(istype(M,/turf)) return
sleep(5)
src.Attack(M)


Thats just a quick one you can modifiy it to your liking
In response to A.T.H.K
*scrathes his head* im no coder but what does that work on?
Page: 1 2