ID:162906
 
So what I wanted to do here is just get the obstacle to disappear when the verb is used but not delete the whole tile,
maybe I aught to be using an object here instead, though relaying the floor tile wouldn't be objectionable either. Mostly I just want it to be an obstacle that when removed can be walked through, but I'm using a different floor turf on this z level so it deletes to the original turf tile which look lame. Maybe a way to change the default floor tile based on z level? I was going to make this something more of a mechanic with other factors involved other than just the verb activation but I'd just like to get this part working first.

Mike




turf
Shraiarubble
icon='Shraiarubble.dmi'

density =1
verb/Merg()
set category = "Action"
set src in oview(1)
del(src)


Use an object. It'll delete the object and leave the turf alone.


If you're making a multi player-game, look up the use of images if deleting the thing is a something you need to do to get further into the game.
In response to Mechanios
Got it working going down the obj path. I wanted it to use a quiz elements to give the player a challenge to use the action so when they use transmit rocks it asks them a question and sees if they got the answer right, I'll probably put a penalty for getting it wrong too. Theres alot more questions in there just posted the first couple, using the game to study for my classes atm heh.

been reading Kunark's DM Programming Tutorial for alot of clarification with some demo cannibalization.

mike-

mob
var/carried1=0
obj
Shraiarubble
icon='Shraiarubble.dmi'
density =1

proc/Merg(mob/M as mob)
set category = "Action"
set src in oview(1)
if(M.carried1 == 1)
del(src)
else
..()
..()
obj/Inventory

proc
OnGet()
..()
OnDrop()
..()
AllowGet()
return 1
AllowDrop()
return 1
AllowEquip()
return 1
AllowUnequip()
return 1

Equipment

var
identifier
strength
defense
carried1
Click()
if(ismob(src.loc))
if(src.loc && src.loc.vars["[src.identifier]"]==src)
src.Unequip_Something()
else
src.Equip_Something()
proc
Equip_Something()
set category = "Action"
set name="Equip"
set src in usr
var/mob/P=usr
P.Equip(src)
Unequip_Something()
set category = "Action"
set name="Unequip"
set src in usr
var/mob/P=usr
P.Unequip(src)
proc
OnEquip()
OnRemoval()

mob
var
obj/Inventory/Equipment
Weapon/weapon
Shield/shield
LegArmor/Leg_Armor
Gloves/Gloves
Amplifier/Amplifier
Device/device
proc
Equip(obj/Inventory/Equipment/E)
if(!istype(E) || !E.AllowEquip() || !(E.identifier in src.vars) || src.vars["[E.identifier]"])
return 0
E.OnEquip()
src << "You equip \a [E]."
src.vars["[E.identifier]"]=E
E.suffix="Equipped"
Unequip(obj/Inventory/Equipment/E)
if(!istype(E) || !E.AllowUnequip() || !(E.identifier in src.vars) || src.vars["[E.identifier]"]!=E)
return 0
E.OnRemoval()
src << "You unequip your [E]."
src.vars["[E.identifier]"]=null
E.suffix=""
Get(obj/Inventory/E)
if(istype(E) && E.AllowGet())
src << "You get \a [E]!"
E.Move(src)
E.OnGet()
Drop(obj/Inventory/Equipment/E)
if(istype(E,/obj/Inventory) && E.AllowDrop())
if(src.vars["[E.identifier]"]==E)
Unequip(E)
src << "You drop the [E]."
E.Move(locate(src.x,src.y,src.z))
E.OnDrop()

obj/Inventory
Equipment
Device
identifier="device"
Material_Transmitter
icon='artifact.dmi'
carried1=1
proc
Transmit_Rocks(obj/Shraiarubble/S as obj in oview(1))
set category="Psionic"
var/Psiblast = pick(question_list2)
var/Answer = ParseQuestion2(usr,Psiblast)
if(Answer == TRUE)
del(S)
else
..()

OnEquip()
if(istype(src.loc,/mob))
var/mob/P=loc
P.carried1+=src.carried1
P.verbs+=/obj/Inventory/Equipment/Device/Material_Transmitter/proc/Transmit_Rocks
OnRemoval()
if(istype(src.loc,/mob))
var/mob/P=loc
P.carried1-=src.carried1
OnDrop()
Unequip_Something()
proc
ParseQuestion2(Target,QuestionContent)
var/list/Answers = question_list2[QuestionContent][1]
if(!Answers) return FALSE
var/CorrectAnswer = question_list2[QuestionContent][2]
if(!CorrectAnswer) return FALSE
var/GivenAnswer = input(Target,QuestionContent) in Answers
return (GivenAnswer == CorrectAnswer)
var/list
question_list2 = list("Study of cause of disease?" = list(list("epidimology","pathology","etiology"),"etiology"),
"study of factors affecting the health and illness of populations?" = list(list("epidimology","pathology","etiology"),"epidimology"))