var/mob/A = new /mob/Monster/DoomedSpirit(M.loc)
A.name = "Doomed Spirit A"
A.arena = 1
mob/Monster/
icon_state = ""
New()
..()
RandomMove()
src.Health += rand(20,30)
src.MaxHealth = src.Health
It creates the monster and, untill your destroy that monster, it wont run the rest until that monsters destroed. But then it brings errors.. can anyone help?
ID:268149
Mar 25 2004, 5:07 am
|
|
In response to Loduwijk
|
|
Ok..
/mob/New() ..() src.overlays += src.HealthOverlay src.overlays += src.MagicOverlay src.Bars() mob/Monster/ icon_state = "" New() ..() RandomMove() src.Health += rand(20,30) src.MaxHealth = src.Health (works) world/New() sleep(200) world<<"<font color = yellow>Monster Arena Battle: Is starting in 2 minutes!</font>" sleep(600) for(var/mob/NPC/MonsterCombat/M in world) M.BattleOpen = 1 world<<"<font color = yellow>Monster Arena Battle: Monster Battles are now open!!</font>" sleep(600) world<<"<font color = yellow>Monster Arena Battle: Monster Battles are now closed!!</font>" for(var/mob/NPC/MonsterCombat/M in world) M.BattleOpen = 0 sleep(70) MonsterBattleStart() (works) mob/proc/AreanaDeath(mob/M) world<<"<font color = yellow>Monster Arena Battle: [src] has slain [M]!" for(var/mob/Player/A in world) if(A.BetOn == null)return if(A.BetOn == src.name) usr<<"<font color = yellow>You won 500 gold!</font>" usr<<"<font color = yellow>You gained your deposit back!</font>" usr.Gold += 1000 else usr<<"<font color = yellow>You lost your deposit!</font>" (Works) proc/MonsterBattleStart() for(var/mob/NPC/MonsterCombat/M in world) M.BattleOpen = 1 if(M.R == 1) var/mob/A = new /mob/Monster/DoomedSpirit(M.loc) (after the mob is creating it seems to put that first priority.. I want it to set the name and stuff before you fight it) A.name = "Doomed Spirit A" A.arena = 1 var/mob/B = new /mob/Monster/DoomedSpirit(M.loc) B.name = "Doomed Spirit B" B.arena = 1 world<<"<font color = yellow>Monster Arena Battle: Start!" A.StartBattle(B) sleep(2000) world<<"<font color = yellow>Monster Arena Battle: Is starting in 2 minutes!</font>" sleep(1200) world<<"<font color = yellow>Monster Arena Battle: Monster Battles are now open!!</font>" sleep(600) MonsterBattleStart() |
In response to Loduwijk
|
|
want me just to show u?
You are currently connected to Phoenix Quest! byond://65.35.224.246:5 |
In response to Kasumi Tomonari
|
|
The way you are calling RandomMove() is the cause of this, when you do "var/mob/A = new /mob/Monster/DoomedSpirit(M.loc)" it calls RandomMove() and waits for it to return, which I'm guessing it doesn't (you probably have it setup to loop). What you want to do is use "spawn()RandomMove()" this tells it "Do this proc, but don't wait up for it to finish".
|
What exactly do you mean by "the rest?" Do you mean it will not move the creature and set its health and name?
Also, when exactly does the error show and what does it say? "But then it brings errors.. can anyone help?" Does that mean it shows the error when it is destroyed?
Lastly, how do you know it is doing anything when the object is destroyed? If it is being destroyed I don't see how you could know the rest of the code kicks in as it appears you are saying.