home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_00_t_inv_pickup.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
2KB
|
85 lines
# DroidWorks
# 03_env_tanks.cog
#
#
#
# Battery is in inventory bin 16
# Power is in inventory bin 20
#
# Script handles random enviroment object for the gear level. It also handles
# the pick-up for right now, although I might change that later on.
#
# Set the inv_number to what bin you want it added to.
# Set amount var to how many things you have attached.
#
# [01/16/98] DGS Created
# [01/26/98] DGS Added code to make it random
# [01/29/98] JP Modified to work in the Moisture Farm Level
symbols
thing thing0
thing thing1
thing thing2
message taken
message startup
message pulse
int amount=0
flex set=0.0
int inv_number=0
int act_thing
sound pickup=nrginventory.wav local
end
# ========================================================================================
code
startup:
set = (rand()*amount);
if (set < 1)
{
print("Rand: 0");
// Keep thing 0
act_thing = thing0;
destroything(thing1);
destroything(thing2);
}
else if ( set < 2)
{
print("Rand: 2");
// keep thing 1
destroything(thing0);
act_thing = thing1;
destroything(thing2);
}
else if ( set < 3)
{
print("Rand: 3");
// Keep thing 2
destroything(thing0);
destroything(thing1);
act_thing = thing2;
}
return;
pulse:
call startup;
printflex(set);
return;
taken:
SetInvAvailable(getlocalplayerthing(), inv_number, 1);
ChangeInv(getlocalplayerthing(), inv_number, 1);
destroything(act_thing);
dwplaycammyspeech(16150, "TGCA027.wav", 5, 2);
playsoundlocal(pickup, 1, 0, 0);
dwflashinventory();
return;
end