I am trying to make a visual basic program able to put the information to variables
Can Visual Basic 6 be coded read a language like this
Code:
actor NamiDarkImp 3100
{
Health 120
Radius 20
Height 56
Speed 8
PainChance 200
MONSTER
+FLOORCLIP
+FOILINVUL
SeeSound "imp/sight"
PainSound "imp/pain"
DeathSound "imp/death"
ActiveSound "imp/active"
MeleeSound "imp/melee"
Obituary "%o was cursed by a dark imp."
HitObituary "%o was touched by a dark imp."
MissileType DarkSeeker
MeleeDamage 3
States
{
Spawn:
DRKI AB 10 A_Look
Loop
See:
DRKI AABBCCDD 3 A_Chase
Loop
Melee:
Missile:
DRKI EF 8 A_FaceTarget
DRKI G 6 A_ComboAttack
Goto See
Pain:
DRKI H 2
DRKI H 2 A_Pain
Goto See
Death:
DRKI I 100
DRKI J 8 A_Scream
DRKI K 6
DRKI L 6 A_Fall
DRKI M -1
Stop
XDeath:
DRKI N 5
DRKI O 10 A_XScream
DRKI P 5
DRKI Q 5 A_Fall
DRKI RST 5
DRKI U -1
Stop
Raise:
DRKI ML 8
DRKI KJI 6
Goto See
}
}
Yes it can be used to read a language like that. I assume you want someone to write you something? We might need a bit of information on how you want the data to be available..
How is it stored? In a text file?
What do the words mean?
Is the first part a list of properties and the second part instructions for actions?
And what should be done with it once it is read?
Yes it can be used to read a language like that. I assume you want someone to write you something? We might need a bit of information on how you want the data to be available..
I'll write up an example of parsing something [b]like[/b[ this, but I won't be doing the exact same language, because I don't know how you want them stored. Give me about 10 minutes..
The way it works is by moving through the script 1 character at a time. Each time it moves forward, it checks a certain length ahead, for a keyword. So:
VB Code:
If (UCase$(Mid$(str, currPos, [b]13[/b])) = "ACTOR") Then
..will not execute at all, because "ACTOR" isn't 13 characters long. So change it to:
VB Code:
If (UCase$(Mid$(str, currPos, [b]5[/b])) = "ACTOR") Then