Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | chip programmers | 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