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 (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 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
Look for item within close range. #176934
01/07/08 19:17
01/07/08 19:17
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Another question from me...
I have a gun in my map, and I want a sprite to become visible when the player gets within a given number of quants towards the gun.

Example:

http://217.121.118.194/3dgs/screen1.jpg


The best games are the games you create yourself.
Re: Look for item within close range. [Re: NL_3DGS_n00b] #176935
01/07/08 22:25
01/07/08 22:25
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
You should really use the manual, or look in the AUM's before posting questions like this, your thinking of c_scan(); look it up in the manual since its all right there. What you want to do is tell the gun to scan the area, and make your player sensitive to the scan through a preset trigger. When your player is in range, under the trigger, tell the sprite to spawn where you want it too.


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: Look for item within close range. [Re: Trooper119] #176936
01/07/08 22:38
01/07/08 22:38
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
I do wan't to find out myself, but c_scan etc. is new for me.
I understand c_move, but I dont understand c_scan, and don't know how to add it to my script.
I looked in the manual before I posted this topic, but I dont understand how it works.
Thats why I'm asking here, and thats where this forum is for.


The best games are the games you create yourself.
Re: Look for item within close range. [Re: NL_3DGS_n00b] #176937
01/07/08 22:51
01/07/08 22:51
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
I am sorry if I sounding blunt, because I'm a little irritated with my own code right now, but I'll offer you this advice. Search the AUM's, they have most of the code your looking for similar to what you want. George is a great guy, take a look what he has given to the community. He explains things like c_scan, c_move, ect. at length, I simply don't remember which of the AUM's do this.


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: Look for item within close range. [Re: Trooper119] #176938
01/08/08 09:34
01/08/08 09:34
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
I understand how you feel.
Still, I appreciate your replies.
I will check the AUM's when I'm home.
I only read the latest 10 AUM's, so maybe that is why I didn't find it.
I also completed the Lite-C workshops, but c_scan isn't explained in there, so that is why I got stuck in my script.


The best games are the games you create yourself.
Re: Look for item within close range. [Re: NL_3DGS_n00b] #176939
01/08/08 18:14
01/08/08 18:14
Joined: Aug 2002
Posts: 673
Las Cruces, NM
JimFox Offline
User
JimFox  Offline
User

Joined: Aug 2002
Posts: 673
Las Cruces, NM
A simpler way that might work fine for you is to use vec_distance. I use it all the time and it has the advantage of being fast. Look it up in the manual and it will give examples of how to use it.
Edit: I should have said vec_dist for lite-C.
Regards,

Last edited by JimFox; 01/08/08 18:17.

Jim

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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