View Full Version : is there a cog that makes .......
G-Man
08-02-2004, 11:25 AM
is there a cog that makes that enemys cannot see me in rooms with xxx light mode or that enemys cannot see me when I'M in room xxx.
If Yes let me know...
------------------
Sprite (http://www.pcgamemods.com/1992)Mod (JO 2003) (http://jediknight.filefront.com/file.info?ID=16922)
Edward
08-02-2004, 11:41 AM
I'm afraid not... YET!
You can either have an array of sectors and test if the player is in that sector (I'm in room xxx).
sector room0-100
for(i=0; i<=100; i=i+1)
{
If(GetThingSector(player)==room0[i]) then...
}
Or, you can use GetSectorLight(sector) (can't see me in rooms with light xxx). Will save on symbol space.
pulse:
sector=GetThingSector(player);
if(GetSectorLight(sector)=xxx) then...
Now, for the enemies not to see you, well... You could use the 'Disable AI' cheat (whiteflag 1). It is the SetDebugModeFlags(0x1); flag.
Hope this helps.
/Edward
Cogman
08-03-2004, 11:03 AM
the other option is you can change the Ai to a non agressive AI. (making it much better for situation where 2 enemies can see you but others are left in the dark.) using AiSetClass
------------------
:) ;) :) ;) :) ;) :) ;) :) ;) :) ;) Im Happy
EH_AceCSF
08-03-2004, 01:32 PM
#
# Keeps an enemy asleep until triggered awake
#
# [RD]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ================================================== ======================================
symbols
message startup
message pulse
thing enemy0
thing enemy1
thing enemy2
thing enemy3
thing enemy4
thing enemy5
sector sect local
int i local
int pulserate=1
int countsectors
end
# ================================================== ======================================
code
startup:
setPulse(pulserate);
return;
# ================================================== ======================================
pulse:
for(sect=0; sect<countsectors; sect++)
{
If(GetThingSector(player)==sect)
{
if (enemy0 >= 0) AISetMode(enemy0, 0x2000);
if (enemy1 >= 0) AISetMode(enemy1, 0x2000);
if (enemy2 >= 0) AISetMode(enemy2, 0x2000);
if (enemy3 >= 0) AISetMode(enemy3, 0x2000);
if (enemy4 >= 0) AISetMode(enemy4, 0x2000);
if (enemy5 >= 0) AISetMode(enemy5, 0x2000);
}
else
{
if (enemy0 >= 0) AIClearMode(enemy0, 0x2000);
if (enemy1 >= 0) AIClearMode(enemy1, 0x2000);
if (enemy2 >= 0) AIClearMode(enemy2, 0x2000);
if (enemy3 >= 0) AIClearMode(enemy3, 0x2000);
if (enemy4 >= 0) AIClearMode(enemy4, 0x2000);
if (enemy5 >= 0) AIClearMode(enemy5, 0x2000);
if (enemy0 >= 0) AISetMode(enemy0, 0x200);
if (enemy1 >= 0) AISetMode(enemy1, 0x200);
if (enemy2 >= 0) AISetMode(enemy2, 0x200);
if (enemy3 >= 0) AISetMode(enemy3, 0x200);
if (enemy4 >= 0) AISetMode(enemy4, 0x200);
if (enemy5 >= 0) AISetMode(enemy5, 0x200);
}
}
return;
end
note "countsectors" need to be number of sectors in level. i have no idea how to detect this.
pulserate is rate in second to make cog check for player position. Should be 1 i think.
I hope it works ok
EH_AceCSF
08-03-2004, 01:35 PM
uh i alredy know i done error. however i can change my post ;(. I dont see it. In for you need to add (after for() ):
if(getsectorlight(sect)==0)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.