home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_b0_env_gear.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
2KB
|
119 lines
# DroidWorks
# b0_env_battery.cog
#
# Randomizer cog for the Gear level.
#
#
#
# Script handles random enviroment object for the maze.
# taken from env_pulley
#
#
# [01/16/98] DGS Created
# [01/26/98] DGS Added code to make it random
# [01/30/98] DGS Took from env_gear.cog and added extra things
# [02/04/98] DGS Took from b0_enf_pulley.
# [03/30/98] DGS Took from Maze_rand and converted it to Gears.
symbols
sector Shuffle_s
thing thing1
thing thing2
thing thing3
message startup
message pulse
message entered
message taken
int amount=3
int inv_number=0
int act_thing=0 local
flex set=0.0 local
int enter=0 local
end
# ========================================================================================
code
startup:
setpulse(0.2);
return;
pulse:
set = (rand()*amount);
// print("luke");
// printflex(set);
return;
entered:
if (enter == 0)
{
print("b0_env_Ger.cog: Entered");
enter = 1;
setpulse(0);
call destroy;
}
return;
destroy:
if (set < 1)
{
if (thing2 != -1) destroything(thing2);
if (thing3 != -1) destroything(thing3);
act_thing = thing1;
}
else if ( set < 2)
{
if (thing1 != -1) destroything(thing1);
if (thing3 != -1) destroything(thing3);
act_thing = thing2;
}
else if ( set < 3)
{
if (thing1 != -1) destroything(thing1);
if (thing2 != -1) destroything(thing2);
act_thing = thing3;
}
return;
taken:
print("taken");
arm_str = dwGetArmStrength();
print("arm strength is");
printint(arm_str);
if (arm_str > 8)
{
print("you are strong");
SetInvAvailable(getlocalplayerthing(), inv_number, 1);
ChangeInv(getlocalplayerthing(), inv_number, 1);
destroything(act_thing);
dwflashinventory();
if (inv_number == 25)
{
// 17307 You picked up a small gear.
dwPlayCammySpeech(17307, "t9ca008.wav", 10, 0);
}
else if (inv_number == 26)
{
dwPlayCammySpeech(17308, "t9ca009.wav", 10, 0);
}
}
else
{
print("you are weak");
dwplaycammyspeech(0, "m2ca022.wav", 20, 2);
}
return;
end