Hallo zusammen!ich versuche gerade das TUT AUM 9---cash
nachzumachen!!!
aber wen ich das script speicher und als
include <cash.wdl> aufruf und das spiel lade!!!
dann erscheint gleich das geld obwohl ich es noch nichtmal aufgesammelt habe!
// don't forget to include <cash.wdl>;
// attach action get_cash to the models that are supposed to get you some cash
// skill1 = amount of cash (default = 30)
// attach action buy_items to the models that can be bought
// skill1 = object's cost (0 = free)
//////////////////////////////////////////////
font arial_font = <arial16.pcx>, 21, 24;
//////////////////////////////////////////////
var cash = 0;
/////////////////////////////////////////////
bmap cash_map = <cashpan.pcx>;
/////////////////////////////////////////////
function add_money();
function buy_me();
/////////////////////////////////////////////
sound gotcash_snd = <gotcash.wav>;
sound spentcash_snd = <spntcash.wav>;
/////////////////////////////////////////////
panel cash_pan
{
bmap = cash_map;
layer = 20;
pos_x = 0;
pos_y = 0;
digits = 40, 22, 4, arial_font, 1, cash;
flags = transparent, overlay, refresh, d3d;
}
action get_cash
{
my.enable_impact = on;
my.event = add_money;
}
function add_money()
{
wait (1);
if (my.skill1 == 0) {my.skill1 = 20;} // default = 20 bucks
if (cash == 0) {cash_pan.visible = on;}
cash += my.skill1;
snd_play (gotcash_snd, 70, 0);
ent_remove (me);
}
/////////////////////////////////////////////////
action buy_items
{
my.enable_click = on;
my.event = buy_me;
}
function buy_me()
{
wait (1);
if (event_type != event_click || cash < my.skill1) {return;}
cash -= my.skill1;
snd_play (spentcash_snd, 70, 0);
ent_remove (me);
}