Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Kingware, AndrewAMD, AemStones, RealSerious3D, degenerate_762), 837 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
scan_entity problem #352885
01/06/11 14:23
01/06/11 14:23
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
Hello,
From past couple of days i am trying to make the scan_entity detect an entity in it's scan range but it doesn't.
though the entity is in it's scan range but when i perform scan_entity it gives empty pointer error when pointing to you pointer which is supposed to be returned by scan_entity to first found entity object by scan. here is my code...

Code:
if (vec_dist (my.x, player.x) < 800) // the player approaches the enemy
		{			
			temp.pan=360;	//full 360 degree scan;
			temp.tilt=60;
			temp.z=1000;	//scan range
			scan_entity(my.x,temp);
			you.skill1=50;		//gives empty pointer error


though the entity is in scan range and it's enable scan is set to on.
Here is my test level uploaded if you got time to check it and diagnose the problem I will be very thanksfull

cover.zip [345 kb]

Thank You

Re: scan_entity problem [Re: romin2011] #352887
01/06/11 14:30
01/06/11 14:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
scan_entity(my.x,temp); // better use c_scan
if(you) { you.skill1=50; }

or drop the "you" code line and make an EVENT_SCAN event-function where you set my.skill1 = 50;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: scan_entity problem [Re: Superku] #352896
01/06/11 14:52
01/06/11 14:52
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
thanks superku for your help.
if(you) { you.skill1=50; } will never detect the entity in it's scan range all it does is stop showing empty pointer error. And i am using a6 for some reasons and i don't think c_scan is supported and i don't want to upgrade for now.
Is there a way i can detect entities around by scan_entity?
If you have time please download my level and check it your self please.
Thank you

Re: scan_entity problem [Re: romin2011] #352939
01/06/11 17:58
01/06/11 17:58
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
any good soul please?

Re: scan_entity problem [Re: romin2011] #353034
01/07/11 13:18
01/07/11 13:18
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
come on please i really need help

Re: scan_entity problem [Re: romin2011] #353037
01/07/11 13:37
01/07/11 13:37
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Have you tried my 2nd approach?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: scan_entity problem [Re: Superku] #353040
01/07/11 14:15
01/07/11 14:15
Joined: Dec 2010
Posts: 87
R
romin2011 Offline OP
Junior Member
romin2011  Offline OP
Junior Member
R

Joined: Dec 2010
Posts: 87
SHIT LOL IT WAS PROBLEM WITH THE ENGINE OR SOMETHING, I DID UPGRADE THE ENGINE AND IT WORKS LIKE A GOOD BABY.
thanks superku for support


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