Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: SCAN_FLAG2 alternative method [Re: mEnTaL] #307054
01/26/10 20:10
01/26/10 20:10
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Ok I tried that:

c_scan(camera.x,camera.pan,vector(360,50,180),IGNORE_PASSABLE|SCAN_ENTS);
while (you) // repeat until there are no more entities
{
if (you.skill15==1) {you.skill14=1; } //if the searched entity is in the scan cone set its skill
you = ent_next(you); // get next entity
}


But nothing happens. I want after c_scan if there is entitiy WITH skill15=1 in the scan cone sets its skill14 (and that must happens instantly)
HELP PLS !

Re: SCAN_FLAG2 alternative method [Re: mEnTaL] #307066
01/26/10 21:08
01/26/10 21:08
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Other way: Why you don`t make a event at the scanned entities? Your Player make a scan and all entities that would be scanned becomes the event EVENT_SCAN. And now you can check in the event from all entities, is the skill51 set or not.

Re: SCAN_FLAG2 alternative method [Re: Widi] #307071
01/26/10 21:19
01/26/10 21:19
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Yes but the function with the scanning must happen in a certain moment (on_f=scan) And the entity's event is checking in each moment and when the camera gets close it will perform the function.

Re: SCAN_FLAG2 alternative method [Re: mEnTaL] #307077
01/26/10 23:16
01/26/10 23:16
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
What I meant was to not use c_scan at all, but cycle through all entities using ent_next checking their distance from the camera, as well as their other flags/skills.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: SCAN_FLAG2 alternative method [Re: JibbSmart] #307131
01/27/10 12:38
01/27/10 12:38
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
I am not sure if i understand you right, my english is not so good.

You want to scan (on_f = scan) from the camerapos?
You can do that and when you scan, all entities in the scan area set their EVENT_SCAN (set ENABLE_SCAN for all entities). Now the function that you saved in the entity - action (my.event = scan_function) runs. In this Function you can check if the event is giving from a scan (if (event_type == EVENT_SCAN)) and also check the skills of every entity(if (my.skill51 == 1)) .


Last edited by Widi; 01/27/10 18:33.
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1