| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Targeting; for enemies and terminals | |
|---|---|
| Tweet Topic Started: Jun 21 2006, 06:37 PM (368 Views) | |
| Despellanion | Jun 21 2006, 06:37 PM Post #1 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have been working with this for quite some time now and still can't figure out what I am doing wrong. I have had some of Dr.Best's help too but still I am clueless of why this isn't working. My problem is that I need to be able to target certain objects in my game with the crosshair/cursor. When the crosshair is over a terminal or enemy it will draw the name of that enemy or terminal above the object, this indicates that the object is targeted. This is what I have tried so far:
But this doesn't work at all. I have tried running the game in debug mode but the variable global.item_below_cursor doesn't change at all. There must be someone who have done this before and I desperately need that someone's help right now to get this to work. Thank you! |
![]() |
|
| Dr. Best | Jun 22 2006, 02:22 PM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'm wondering why I didn't see that when you sent me your code before
. You simply mixed up the order of the arguments of the GetDistanceToModel function.What you wrote is this: GetDistanceToModel(model,rotx,roty,x,y,z) But the correct syntax would be this: GetDistanceToModel(model,x,y,z,rotx,roty) I hope it will be working when you change this. |
![]() |
|
| Despellanion | Jun 22 2006, 02:54 PM Post #3 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Finally it is working. One week of debugging and this is the error
Thanks Dr.Best.
|
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)



. You simply mixed up the order of the arguments of the GetDistanceToModel function.
Thanks Dr.Best.
10:34 AM Jul 11