I have an idea how to do this, sort of, but I want to make sure it's possible.
I'm wanting to create a score system. Kind of like in an arcade or Arcade Mode in Modern Warfare (no, I'm not making a fan game/clone, just need a system similar), where players get points for killing enemies (say +10pts), and I want them to be able to see how many points they've gotten.
I was reading over some material, and I saw that you can create custom variables, using:
dimvar=[i]varnamehere[/i]
So, if I have this write, underneath all the fog and ambiance code in the setuplevel.fpi, I could add say...
:state=0:fog=1,fogred=15,foggreen=25,fogblue=40
:state=0:ambience=15,ambiencered=25,ambiencegreen=35,ambienceblue=50
; setup scoresystem
:state=0:dimvar=score
That should create a global variable that I can access and edit later.
Now, I also want to setup a custom HUD element to display this variable to the player. Browsing through the reference, I found this...
hudtype=6 [i];user variable[/i]
&
hudmake=numeric
&
huduservar=[i]uservarhere[/i]
So, again, I should be able to put...
:state=0:hudreset,hudx=44,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=6,hudmake=numeric,huduservar=score
... within the setuplevel.fpi and get it to display my custom variable to the screen similar to the lives or ammo or health counter.
I'm about ready to test it myself, but talking theory never heart. I'd love to hear what other people know about this.
Thanks,
-Pb
The voices in my head said I'm normal... o.0