Wombat2112
Banned
How can I make a character as a global variable so that I ensure that it can be spawned like if you were taking a character from one game and putting him in another? Does it go into some type of file to be established?
# Players must also be loaded
load Snake_Eyes data/chars/snake_Eyes/Snake_Eyes.txt
load Hawk data/chars/hawk/hawk.txt
load Slaughter data/chars/slaughter/slaughter.txt
load Clutch data/chars/Clutch/Clutch.txt
Bloodbane said:I think we have mixed up information here
First of all, characters don't need to be set in variable to be registered in OpenBoR mod. To register one, you have to declare it in models.txt , right inside data folder
This player's section from models.txt
Code:# Players must also be loaded load Snake_Eyes data/chars/snake_Eyes/Snake_Eyes.txt load Hawk data/chars/hawk/hawk.txt load Slaughter data/chars/slaughter/slaughter.txt load Clutch data/chars/Clutch/Clutch.txt
There are more lines in models.txt but I quoted those to show you which lines for players
So if you copy a character from other mod, aside of copying his/her/its sprites and stuffs, make sure you also register him/her/it in models.txt
Second, script variable is used by a script to store value or strings to be used by other script
I could go on but I believe you only need to know the 1st one above
How can I begin learning how to do this via script.
Oh and also how to remove such variable.
Bloodbane said:How can I begin learning how to do this via script.
Hmmm... you can learn using Map demo I've made some time ago.
That demo has feature to unlock new level in world map after completing a level. Global variable is used to do the unlocking.
Once you understand how global variable works, moving to your request should be easy 8)
Oh and also how to remove such variable.
Usually it's done by setting empty value to those variables.
The major question is when those variables be emptied. For your request, there are 2 events
1. After all 5 letters are collected
This should be done in didhitscript
2. In main menu
This should be done in update.c