I have something more BASIC-like language in mind with more powerful conditional statements.
Example:
Code: Select all
// Show the character's location
ShowBlipXY(DEF_SELFX, DEF_SELFY, DEF_BLUE)
//Follow the leader!
IF StateIs(STATE_SPAWNED) THEN
SetState(STATE_FOLLOW)
END IF
IF StateIs(STATE_KILLED) THEN // This reduces the height of the char
PlaySound(6)
//Last words
IF TargetIs(TARGET_ONSAMETEAM) THEN // Fragged!
SendMessage("Sir_%n_has_fallen...")
ELSE IF TargetIs(TARGET_SELF) THEN // No, just a damage tile
SendMessage("%n_wasn't_very_careful.")
END IF
DropMoney(DEF_SELFMONEY) // Drop money
SetBumpHeight(45)
END IF // StateIs(STATE_KILLED)
The number of function names is highly reduced.
Messages can be written directly into the scripts so "messages.txt" is not needed anymore.