|
7 registered members (TipmyPip, Martin_HH, Volkovstudio, AndrewAMD, JMMAC, Grant, 1 invisible),
5,432
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: IGNORE_FLAG2
[Re: Lukas]
#320115
04/19/10 19:05
04/19/10 19:05
|
Joined: Dec 2003
Posts: 1,225 germany
gri
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
hi,
I have the following scenario.
My troops and an enemy group of cruel soldiers staying at the same place.
With an "c_scan" command each of my men trys to find its closest enemy. So I could set the FLAG2 of the enemies and c_scan them with the SCAN_FLAG2 parameter to detect the enemys only.
The enemies tries to c_scan my men too. Because my troops havent set the FLAG2, the enemies calling c_scan with IGNORE_FLAG2 to find only my units.
Fine, this works with 2 parties. But what if there is a third or fourth group with diffrent relations to the other?
Here it would be helpfull if we could use all the flags and not only flag2. Or what would you suggest to solve this ?
Hint: I use a "timer" like functionality to spreed the massive c_scan calls over several engine frames to keep the framerate. Its not needed that all warriors scanning their enviroment at the same frame and on each frame.
regards, gri
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
Re: IGNORE_FLAG2
[Re: wdlmaster]
#320180
04/20/10 08:37
04/20/10 08:37
|
Joined: Dec 2003
Posts: 1,225 germany
gri
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
hi, @gri I think it is possible with "my.group".... And I know its not. I checked that already. my_troops.group = 1 and the enemy.group = 2 c_scan returns both types of units. I use it with and without IGNORE_PUSH. So the group value seems to get ignored on c_scan. There is no need for IGNORE_xxxxx. You can simply use a "identification skill". Every group get its own ID. If the scanned ID is different, the enemy was scanned. If its the same (my.ID == you.ID) the own team members are detectet. That doesnt work. c_scan delievers the closest entity. What if an friendly unit is next? I had to set the you pointer to this entity and call c_scan with ignore_you again ? No. The c_scan function should filter out certain groups of units like IGNORE_FLAG2 | IGNORE_FLAG5. regards, gri
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
Re: IGNORE_FLAG2
[Re: wdlmaster]
#320194
04/20/10 11:00
04/20/10 11:00
|
Joined: Dec 2003
Posts: 1,225 germany
gri
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
Yes it works!!! The scanning entity must use ENABLE_DETECT. It detects every entity in its scan range. This way, you can "select" any enemy, not just the closest one. For example, the weakest, the nearest, the fartest ... Ahh yes, you're right. This will work. Primary I searched a solution which avoids calling the event-functions of all entitys in scanrange and deceide if its friend or enemy. I thought to give the c_scan function a preselected group (like scan_flag2) would be the more cleaner and at runtime faster way. But when JCL refuses to enhance the c_scan function, I only have the option to go with the event functions. Thank you wdlmaster. regards, gri
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
|