Posted By
|
Message
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
21st June, 2003 at 10:40:28 -
yes i know how to do A.I sight but i need to know somethink.
A.I sight is invisble and represents how smart the enemy but what happens if you was behind a wall, the enemy turns and its sight overlapps the wall and me, how can i make the sight smaller when it overlapps the wall so the sight ends when it collides with the walla and doesn't overlap me?
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
21st June, 2003 at 10:42:57 -
oh and i use TGF so if there was a MMF extension for this that will be no good.
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
Registered 23/09/2002
Points 4811
|
21st June, 2003 at 13:10:01 -
you don't need to make the line of sight object smaller. just have the enemy fire a detector object... if it doesn't hit the player, continue as normal... if it does, then there's no wall there. you only need to fire the detector when the LOS is overlapping a wall.
www.thenatflap.co.uk
|
Matt K ( Kodex )
Registered 01/01/2003
Points 42
|
21st June, 2003 at 13:32:35 -
yea, when i made onlsaught X beta, the enemies detection is simply that the enemy fires an object every 100th of a second in its direction. To make it so the vision range widens the further away it is from the enemy u animate the object which it fires so that it gets progresivly bigger.
if u need more help mail me: matthew.kench@v21.me.uk or MSn messenger: scytherkodex@hotmail.com
n/a
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
21st June, 2003 at 19:11:44 -
is it open source, could i have a look at it?
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
23rd June, 2003 at 14:22:07 -
pete, thanks i never thought of that.
i said it in another board but i say it again:
im a fool
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Shme (Stupid Liar) Too late to fornicate
Registered 05/11/2002
Points 574
|
24th June, 2003 at 16:38:06 -
thanks Pete, that's a great idea
Stinkiest click stuff
http://www.skunk-e.cjb.net
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
25th June, 2003 at 16:07:17 -
Shme you didn't know that eva? im not alone
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Muggus Possibly Insane
Registered 31/07/2002
Points 2958
|
26th June, 2003 at 10:44:34 -
In case you interested...cause I've done something similar to Pete's idea before...check out this example I made a while back on Clickteam
http://www.clickteam.com/CTforum/showthreaded.php3?Cat=&Board=fac&Number=142118&Search=true&Forum=fac&Words=muggus69&Match=Username&Searchpage=1&Limit=25&Old=allposts&Main=142118
You could easily make it like Pete's idea by simply animating the Enemy Sight object things. Hope it helps!
MUGGUS
Come and annoy me more at
www.muggus69.tk
STOUT ANGER!!!
|
Shme (Stupid Liar) Too late to fornicate
Registered 05/11/2002
Points 574
|
26th June, 2003 at 11:16:36 -
spiderhead, i wasn't actually doing any games that needed that...just few experiments
Stinkiest click stuff
http://www.skunk-e.cjb.net
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
28th June, 2003 at 16:48:26 -
Spiderhead, put a condition in Ai sight overlapping wall into your line of sight code and negate it that way when the sight thing is over a wall it wan't carry out any actions, just continue on it's way.
Craps, I'm an old man!
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
29th June, 2003 at 04:12:44 -
yeah but if the sight was over a wall and in front of it was the charater it would have no effect because of the wall in front
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
29th June, 2003 at 11:33:01 -
Could you make it smaller by telling the sight to bounce off the wall and not always have it set to the AI's location (that was confusing, try this)
LOS Object collides with Background - Bounce LOS Object Set flag 1 to on
Always And LOS Ob.Flag 1 is off - Set LOS Ob X, Y
Basically, the los Object would stop re updating itself and stop going through the wall in the first place, needs some work though..
Craps, I'm an old man!
|
Blackgaze Possibly Insane
Registered 01/11/2002
Points 3161
|
30th June, 2003 at 07:10:55 -
i get it except for the fort the part "set LOS ob X, Y
what is OB?
Formerly known as "Spiderhead".
Returned after four years.
www.youtube.com/user/sevlech for more infomation
|
KlikFactory
Registered 11/01/2002
Points 692
|
1st July, 2003 at 00:33:42 -
I think having the player character shoot off detectors is better than the enemies doing it. For one thing, I'm pretty sure having all the enemies do it is gonna slow down your game. For another, it's complicated to program the game to tell which enemy shot the detector you got hit by.
Having the the main character shoot off detectors is simple and works just as well. Just make it so that when an enemy gets hit by one a flag goes on that makes it start shooting or whatever. To lower enemy detection radius just make the detectors THE PLAYER shoots off go away after .3 or .whatever seconds.
EXAMPLE:
-------------------------------------------------------
MAKE PLAYER SHOOT DETECTOR IN ALL DIRECTIONS EVERY .01 SECOND:
Every 0'00'01 seconds
---<Player> shoots <Detector> up at 100 speed
---(repeat for every other direction so there's 16 total or all 32 if you're feeling frisky)
IF DETECTOR HITS ENEMY SET ENEMY FLAG ON:
<Detector> collides with <Enemy>
---Set <Enemy> Flag 1 On
EVERY SECOND THAT ENEMY FLAG IS ON HAVE ENEMY SHOOT AT PLAYER AND TURN FLAG OFF:
<Enemy> Flag 1 is On
Every 0'01'00
---<Enemy> shoots <EnemyBullet> at <Player>
---Set Flag 1 Off (will go on if enemy is alerted again- so they won't stay alerted permanently)
-------------------------------------------------------
Note that in that last event "every 0'01'00" MUST go after '<Enemy> Flag 1 is On. Why? This way the second timer starts when the enemy flag turns on. Otherwise you're going by the game timer and thus it checks every second of the game to see if the flag is on. This will often make the event happen before you'd like (if the Flag goes on, for example, one hundredth of a second before the 33rd second in the game, it will be one hundredth of a second before the event happens)
And THAT is how you do enemy detection in 3 simple events! Oh yes, you have to make the detectors be destroyed when they hit a backdrop, so I guess it's just 4. =/
To lower enemy detection radius just make the detectors THE PLAYER shoots off go away after .3 or .whatever seconds.
--------------------------------------------------------
EVERY 0.01 SECONDS ADD 1 TO DETECTOR'S ALTERABLE VALUE A:
Every 0'00'01
---Add 1 to <Detector> Alterable value A
DESTROY DETECTOR IF ALTERABLE VALUE A IS AT LEAST 30:
<Detector> Alterable value A > 29
---Destroy <Detector>
--------------------------------------------------------
This works just the same as if the enemy shot the detectors.
WELL, that's it! Sorry if you've already incorperated your version of the AI and don't need this- but I tend to go into tedious detail about this stuff when I start talking about it!
Good luck!
-The Klik Factory
Why's there a star next to the Sig? What if I don't want a sig? This sucks.
|
|
|