|
Re: Basic Trace/Scan Noob question?
[Re: RyuShinji]
#251806
02/15/09 01:25
02/15/09 01:25
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
Look in the manual under c_scan, then just have it check if an entity enters the scanning area and make a conditional to test if it is the player. c_scan will return you as the pointer to the entity that came into the area, you can then check if(you == player).
Last edited by GamerX; 02/15/09 01:25.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: Basic Trace/Scan Noob question?
[Re: RyuShinji]
#251867
02/15/09 11:53
02/15/09 11:53
|
Joined: Aug 2003
Posts: 2,011 Bucharest, Romania
George
Expert
|
Expert
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
|
Use something like this in the while loop that's used by the enemy's action:
c_scan(my.x, my.pan, vector(120, 60, 1000), IGNORE_ME | SCAN_ENTS); if (you == player) { // do what's needed here; the enemy has detected the player }
The player would have to be made sensitive to scanning. 120, 60, 1000 give the angles and the scanning range - check the manual.
|
|
|
Re: Basic Trace/Scan Noob question?
[Re: George]
#251875
02/15/09 12:08
02/15/09 12:08
|
Joined: Jun 2007
Posts: 152 Norway
Darkyyes
Member
|
Member
Joined: Jun 2007
Posts: 152
Norway
|
This is related to his problem, how can I make my enemies see themselves and if they collide with eachother they will go through eachother? and only eachother? :- )
New to lite-c and gamestudio in general, thank you for reading. Com, A7 v7.7
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|