Could someone please get me started on and open door with key verb. Im very new to DM and Im trying to read all the guides and stuff :)
(Just wondering if this is even close)
verb
Open()
if (hkey in usr.loc)
Thanks
ID:261386
![]() Feb 17 2002, 12:52 am
|
|
Ok I read over the whole thing :) It was very helpfull and I wanted to say good job. But I still need some help with the door. And I walos used the attack verb that you made and I wanted to make the damage you and the npc did random.
Thank you |
Random Damage
If you want it random, and not depend on your strength and defense, then instead of defining var/damage as that, define it as var/damage = rand(1,10). That would make damage a random number between 1 and 10. Doors First you need two icons. Opened and Closed. Then, make the object. obj There ya go. Hope i helped. -Rcet |
You did it! Thank you so much both things worked. Adn its working great! Just one little thing...Can you see anything weong. I bet its just one little thing :( Thanks
mob NPC Worm icon = 'Worm.dmi' name = "Worm" HP = 10 Max_HP = 10 strength = 5 exp_give = 5 gold = 1 var/mob/PC/P New() .=..() spawn(1) Wander() proc/Wander() while(src) if (P in oview(5)) step_towards(src,P) else step_rand(src) for(P in view(src)) break sleep(13) spawn(40) Wander() Bump(mob/M) if (istype(M,/mob/PC)) Attack(M) proc/Attackk(mob/M) flick("Worm_Attack",src) sleep(2) var/damage = rand(1,3) M.HP -= damage view(src) << "[src] attacks [M]!" view(src) << "[damage] damage!" deathcheck() ----------------------------------------------------------- Lyodia.dm:239:error:rand:bad proc Lyodia.dm:239:error:= :expected a constant expression Lyodia.dm:240:error:M.HP:duplicate definition Lyodia.dm:240:error:damage:duplicate definition Lyodia.dm:240:error:-= :instruction not allowed here Lyodia.dm:241:error:src:value not allowed here Lyodia.dm:241:error::duplicate definition Lyodia.dm:241:error:src:value not allowed here Lyodia.dm:241:error::duplicate definition Lyodia.dm:241:error:M:value not allowed here Lyodia.dm:241:error::duplicate definition Lyodia.dm:241:error:text "[] attacks []!":value not allowed here Lyodia.dm:241:error::duplicate definition Lyodia.dm:241:error:<< :duplicate definition Lyodia.dm:242:error:src:value not allowed here Lyodia.dm:242:error::duplicate definition Lyodia.dm:242:error:damage:value not allowed here Lyodia.dm:242:error:text "[] damage!":value not allowed here Lyodia.dm:242:error::duplicate definition Lyodia.dm:242:error:<< :duplicate definition Lyodia.dm:38:'Cdoor.dmi':warning: file found only in .rsc |
Ok everything is working great thanks to you ;) I just nedd one more thing to finish the doors. I need to kinda get an idea of how to set a door to lock and be able to unlock and lock with a certain item. Thank you
|
Put this under the door
New() door = "locked" or locked = 1 Use the boolen 0 - unlocked, 1 - locked LJR |
Just a suggestion as a gamer. I really prefer it when people use the Bump() proc to open doors instead of clicking.
That's just my preference, your the one making the game so you can do it anyway you want :) Since your new you might not know about Bump() yet so don't sweat it if you don't. |
Bump was one of my 1st major problems in Kemet as its a major factor in the gameplay. But for a lock and unlock I'd much rather have a click than a bump.
LJR |
Locking, and Unlocking Doors.
What you have to do, is first make a key. obj Then make some unlock and lock verbs under the door. obj Its commented so you dont get lost. Hope i helped. -Rcet |
-Rcet