mob
verb
Summon_Skeleton
if(usr.icon == 'Tao.dmi')
var/obj/Skeleton/O
var/Skeleton=1
for(O in oview)
del(O)
new/mob/Ally/Skeleton(O.loc)
else
return
Here the Error Im Getting, Try To Help me Please
NA2.dm:3:error:Summon_Skeleton :invalid proc definition
Lenien.dmb - 1 error, 0 warnings (double-click on an error to jump to it)
ID:178397
May 18 2002, 1:18 pm (Edited on May 18 2002, 1:27 pm)
|
|
In response to FireEmblem
|
|
Err that made some more errors here they are
NA2.dm:7:error:O:undefined type: O NA2.dm:7:error:oview:undefined var NA2.dm:8:error:O:undefined type: O NA2.dm:9:error:O.loc:undefined type: O.loc NA2.dm:5:O :warning: variable defined but not used NA2.dm:6:Skeleton :warning: variable defined but not used Lenien.dmb - 5 errors, 2 warnings (double-click on an error to jump to it) |
Turles9000 wrote:
mob From looking at the code, I'm assuming you are trying to see if there is an object(skeleton) nearby, and if so, delete it, and replace it with a skeleton mob. <code> mob verb Summon_Skeleton() for(var/obj/O in oview(5)) if(istype(O, /obj/Skeleton)) del(O) O = new /mob/Ally/Skeleton O.loc = src.loc </code> |
In response to Malver
|
|
Not Really Malver, Im Tryin To Check if The User Already has a Skeleton Created and if he does he cant make another skeleton until that one dies,
|
In response to Turles9000
|
|
I Want It So If The Usr already has a Skeleton made then he cant make another one till that one dies.so can anyone get this thing to work?And is there a way so this verb only applys once your able to get it?in my game i got it so you can only get the move by getting to the level and buying the book, but that verb always shows up for everyone
mob verb Summon_Skeleton() if(usr.icon == 'Tao.dmi') var/obj/Skeleton/O var/Skeleton=0 for(O in oview) del(O) new/mob/Ally/Skeleton(O.loc) Skeleton=1 else return loading Lenien.dme NA2.dm:7:error:O:undefined type: O NA2.dm:7:error:oview:undefined var NA2.dm:8:error:O:undefined type: O NA2.dm:9:error:O.loc:undefined type: O.loc NA2.dm:5:O :warning: variable defined but not used NA2.dm:6:Skeleton :warning: variable defined but not used Lenien.dmb - 4 errors, 2 warnings (double-click on an error to jump to it) |
In response to Turles9000
|
|
First of all, what is O that you're looking for? O is nothing, obj/O is any object, obj/corpse/O is a corpse. Second of all, if you want it to give you the verb when you get a book, you have to use add. Look that up in the reference, I don't feel like explaining it all here. Second, right now, your code is setting Skeleton to 0, then setting it to 1, but it has no effect. Add var/tmp/Skeleton to the Tao mob or whatever. That way it isn't saved when you save. Then, the easiest way to do it is just...
mob You'll need to add the verb when you get the book, but since I haven't had to do that, I am not positive on how to do it. Also, it's best to create him on the same tile as the usr, because otherwise you can summon skeletons through dense objects that aren't opaque, which leads to a multitude of problems. |
verb
summon_skeleton()