Page 1 of 1

Need RTS assistance

Posted: Mon Sep 05, 2005 7:48
by wildweasel
You RTS whizzes out there may kindly step up to the table today, because I'm kinda stuck here.

As you may know from reading my journal here, I'm working on a Doom weapon mod that allows the player to purchase his weapons from terminals. I need some help, however:

From EDGE.SCR:

Code: Select all

start_map map01

radiustrigger 0 0 -1
    name DISPENSER1
    tag 101
    TAGGED_INDEPENDENT
    TAGGED_REPEATABLE
    TAGGED_DISABLED
     SHOW_MENU "SupplyBot Lv.1 - Make your selection!" \
    "Buy Crowbar - $10" \
    "Buy Knife - $30" \
    "Shut Down"

    JUMP_ON MENU option1 option2 optionEnd

    label option1
	RETRIGGER
	disable_script DISPENSER1
	jump crowbarfinishstuff

    label option2
	tip "Knife Dispensed." 3 false
	jump finishstuff

    label optionEnd
     jump finishstuff

	label crowbarfinishstuff
	oncondition AMMO16(10)
	oncondition NOT_CHAINSAW
	tip "Crowbar Dispensed." 3 false
	lose_benefit ammo16(10)
	give_benefit chainsaw
    label finishstuff

    disable_script DISPENSER1

end_radiustrigger

end_map
From THINGS.DDF:

Code: Select all

[CHAINSAW:2005]
RADIUS=48;
HEIGHT=56;
SPECIAL=USABLE;
SPRITE_SCALE=0.25;

STATES(SPAWN)=DIS1:A:1:NORMAL:NOTHING;
STATES(TOUCH)=DIS1:A:10:NORMAL:RTS_ENABLE_TAGGED(101),
              DIS1:A:30:NORMAL:NOTHING,
              DIS1:A:10:NORMAL:TOUCHY_REARM,
              #SPAWN;
Here I'm putting together a script, activated by an actor that replaces the Chainsaw. The script is supposed to activate a menu upon using said actor, and when the player selects an option, the script must check for not only the required amount of money (AMMO16), but also if the player already has the weapon or not. I would figure that this code works already (I've even added measures to make sure that the script will still run if the player does not meet said conditions), but if I run the game with these exact scripts, nothing happens when I used the actor. I can only figure that there's something I did wrong. But how do I fix it?

Posted: Mon Sep 05, 2005 23:19
by wildweasel
I've hit another snag (having made no progress on the dispenser machines). I'm trying to make a display on the lower-left corner of the HUD that shows the player's current amount of money (AMMO16), but I don't know how to make an RTS script show values without going brute-force (and making 1,000 individual labels to show each possible number, 0-999).

Posted: Wed Sep 07, 2005 3:56
by Snarboo
Although I'm not well versed in RTS, Lobo has an excellent resource over at his site. Here's a link to it: RTS Online.

Posted: Wed Sep 07, 2005 5:39
by wildweasel
This thread has outlived its usefulness...I did know already about RTS Online, in fact I have it bookmarked. But thank you for your consideration.