ID:144513
 
Code:btxt
        startbattle()
src<<sound(null)
src<<sound('MK3Choose.mid')
src.win=0
src.action = input("What type of action do you want to take?.","Battle",src.action) in list("Attack","Defend","Run","HELP!!!!!")
if(src.action=="Attack")
src.attack=1
src.str-=src.mmdef
src.mmhp-=src.str
----> src<<"[src.battletxt]"
src.str=src.mstr
deathcheck()
if(src.action== "Defend")
src.attack=1
src<<"[monname] saw through your defence."
src.defend=0
deathcheck()
if(usr.action=="Run")
src.run=1
runaway()
if(usr.action=="HELP!!!!!")
src.help=1
deathcheck3()


com23()
if(src.class=="Beat Cop")
src.class="Beat Cop"
src<<"You train as a Cop."
hp=30
mhp=30
str=25
mstr=25
def=20
mdef=20
agi=20
magi=20
end=20
mend=20
kno=15
mkno=15
wis=15
mwis=15
battletxt="You shoot your gun at [monname] for [str] damage."


Problem description: ok i set battletxt for each class, now in battle at the ----> is where it tells you your own battletxt, yet when i join a fight and i attack, it shows a blank line, just dont add the "---->" to the code.

if yall can help me id apreciate it.

VB.

make a verb like this...
mob/verb
Battle_Txt()
usr.battletxt = input("What do you want your Battle text to be?")as text
if(length(usr.battletxt) >=50)
usr.battletxt=""
alert("Your battle text is to long!")
return
if(usr.battletxt=="")
return

Im guessing this is some what, what you want?
~Grand~
In response to KillerGrand
i wanted it to be set, not them having a choice on what they have, i know most people would be like "Noooo it would be better to give em a choice." and id be like "It's my game and i can do what i want with it." like in that one old song called 'its my party and i can cry if i want to' :p

ummmmmmmmm yeaaah.

VB.
In response to VolksBlade
Did you make sure there was atleast a value in that variable (eg: set at creation, maybe making it a list of sayings and using pick() to say one of those randomly in the list)?

- GhostAnime
Wouldn't it work if you replaced src<<"[src.battletxt]" with src<<"You shoot your gun at [monname] for [str] damage."?
In response to GhostAnime
no i didnt i just had
mob
var
battletxt=""


then i had each class define its battletxt
In response to Dice1989
and no dice, if you read it carefully it stated that i wanted each class to have its own battle text, therefor not making each attack go like this "[src] attacks [monname] for [str] damage." my way would be making it unique, if i used the bland version my game would be, how would you say... not good.
In response to VolksBlade
Hm, try double checking than:
mob/verb/Debug_1() world<< src.battletxt
That will output your battle text (like I said, just make sure).

And incase you didn't get what I meant about the pick:
mob/Fighters/Cyborg
battletxt = pick("Blue screen of terror has been annialated!","I'm so smart that I use Linux.","*whirrrrl* *click* Preapare to be terminated.")


// ...insert the battle proc setup here...
view(src)<<pick(battletxt)
// This will randomly pick one of the sayings in the list defined above and use it.\
If you want one saying to be used less often, look up prob()

- GhostAnime
In response to GhostAnime
no work, still blank line.
In response to VolksBlade
just needed a proc to tell the battle what the btxt was. thanks yall