Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 7,008 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
HOW ???Automatic Locking onto enemies??? #8022
01/20/02 15:26
01/20/02 15:26

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hey. I tried posting this in the beginner forum so as not to take up space here, but alas, it might be to advacned. (No Pun intended)

How can I make my gun automatically lock onto an enemy when it is in range? I would like the gun to lock on, and not have the camera change, but just so that if an enemy is in sight, you can fire and automatically hit it.

Thanks, thanks, thanks!!!!


Re: HOW ???Automatic Locking onto enemies??? #8023
01/21/02 05:49
01/21/02 05:49
Joined: Dec 2001
Posts: 941
England
LoneWolf Offline
Developer
LoneWolf  Offline
Developer

Joined: Dec 2001
Posts: 941
England
you could use a scan and event_detect to find the targeted entity. Place an image at its position using vec_to_screen to show the target and make a pointer at the targeted entity. When the weapon is fired use vec_to_angle to point towards the entity and move the bullet at the target.

It should work but would use alot of code



Wolfpack Software (www.wolfpacksoftware.com) A catalyst in the evolution of games Available for paid work

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