Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

zdoom RPG script

Recommended Posts


I dont know a lot about acs, but ive tried to attach this script to a wad I was messing with in db2 and the acc will not compile the script, but I dont see any error with the script. matter of fact, ive used this script in a previous wad using db1 and it worked just fine.
I've updated the acc and it still wont compile.

Anyone got any suggestions???

Share this post

Link to post

It looks like a malformed use of the HudMessage function on lines 109-110:

	HudMessage(s:OPEN_XP, d:xp, s:OPEN_FSLASH, d:xp2lv[lv+1],
		HUDMSG_FADEOUT, 1, CR_BROWN, 0.99, 0.70, 2.0);
That last comma on the first of those two lines should be a semicolon, to seperate the text from the rest of the function's parameters.

Change it to this
	HudMessage(s:OPEN_XP, d:xp, s:OPEN_FSLASH, d:xp2lv[lv+1];
and it should work properly. With that change, I got it to compile, at least. I don't know if there are any other bugs in the code though.

Share this post

Link to post

well great. apparently someone took it upon themselves to go into the wiki and update the code. unfortunatly, although the code compiles correctly now, the scrip doesnt work properly at all.

// xp = Player experience, lv = Player level,
// nextlv = Next level, hp = Player health,
// ar = Player armor, xp2lv = number of xp
// required for each level
int xp = 0, lv = 1, nextlv = 2, hp = 100, ar = 0;
str gained = "";
int xp2lv[10] = {50, 125, 250, 450, 675, 900, 1200, 1500, 2000,

this script shows that for level 1 the xp should be 50, lvl 2 125, and so on. However, when you start the game, you start with lvl.1 and it says xp 0/250 which makes no sense whatsoever.
secondly, when you kill enemies, it doesnt give you any experience at all.
and when you reach 250, it doesnt give you a new level it just makes you keep getting xp over 250. like xp 300/250

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now