![]() |
#1 |
Does anyone
This is a question only for Eduke coders:
Has anyone come up with a way to emulate the "ifcanseetarget" command on any actor? I asked Matt if he would add an "ifcanseetarget <target>" command, and he said he would...... but only if it couldn't already be emulated. He asked me to check. So, here it is. Anyone got it?
__________________
I don't wanna be like other people are Don't wanna own a key, don't wanna wash my car Don't wanna have to work like other people do I want it to be free, I want it to be true Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus |
|
![]() |
![]() |
#2 |
Re: Does anyone
No, but using a QuakeC traceline is more useful anyway.
__________________
You lose. |
|
![]() |
![]() |
#3 |
Re: Does anyone
How is that relevant?
How quick do you need it to be? You could use findnearactor to get the ID, and then get the angles, and dist to the target, and the make a sprite follow the path betwen the two actors, checking for walls, higher/lower sectors, and sprites. The sprite detecting is going to be a little difficult, but shouldn't take more than a fiew days to do.
__________________
The NightStrike... >> www.nightstrike.tk a working EDuke 2.1 mulitiplayer MOD - finaly |
|
![]() |
![]() |
#4 |
Re: Does anyone
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Manson:
and the make a sprite follow the path betwen the two actors, checking for walls, higher/lower sectors, and sprites.<HR></BLOCKQUOTE> That's a traceline. It's better to move along the build structure by calculation than to use a sprite to do it by inference.
__________________
You lose. |
|
![]() |
![]() |
#5 |
Re: Does anyone
And I can think of a really easy way of doing it using shotspark or a similar projectile as the traceline.
__________________
You lose. |
|
![]() |
![]() |
#6 |
Re: Does anyone
I was thinking of the projectile way too, but it'll require redoing much of the game codes,,, Luckily I'm allready doing that, so I don't have any trouple [img]smilies/images/icons/smile.gif[/img]
2nd: ------------------------------------ move along the build structure ------------------------------------ I don't understand. You mean the walls?
__________________
The NightStrike... >> www.nightstrike.tk a working EDuke 2.1 mulitiplayer MOD - finaly |
|
![]() |
![]() |
#7 |
Re: Does anyone
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Manson:
2nd: ------------------------------------ move along the build structure ------------------------------------ I don't understand. You mean the walls?<HR></BLOCKQUOTE> Well, take the angle and elevation of a straight line you want to project. Now move along that line until you reach the edge of a sector. If you are able to move into another sector because the wall is connected to another wall do so. Otherwise stop and return information on wall to programmer. If you are above or below normal playing area (ie in floor or ceiling) calculate the intersection and return information to programmer. Repeat logic steps until you reach an obstacle described and then do something with the result of the trace. Although I'm hazy on the precise details on how Build does this because I'd have to look at the source again but that's the basic concept behind projectiles like shotspark that instantly arrive at their targets. Because you are using the build map structure to calculate this you directly move along the structure rather than create an object in the game world to indirectly move along the structure. I'm confident Matteus could add such a feature in about five minutes seeing as all the code must be there already.
__________________
You lose. |
|
![]() |
![]() |
#8 |
Re: Does anyone
Something like vectors?
I've already bugged Matt about 'em. To use the old projectiles for this, you must define all sprites as enemies. And set the auto-aim to 1 or 2. I think I tried making a distance calculator this way with no luck.
__________________
The NightStrike... >> www.nightstrike.tk a working EDuke 2.1 mulitiplayer MOD - finaly |
|
![]() |
![]() |
#9 |
Re: Does anyone
Now you must know that a hard coded version of what you (Manson) are talking about through CONs would be :
A) Easy to use (Matt could set up a structure for it) B) Faster
__________________
I don't wanna be like other people are Don't wanna own a key, don't wanna wash my car Don't wanna have to work like other people do I want it to be free, I want it to be true Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus |
|
![]() |
![]() |
#10 |
Re: Does anyone
The reason I've bugged Matt about vectors is, that they're faster and easier but, when they're not in, you must find some alternatives right?
__________________
The NightStrike... >> www.nightstrike.tk a working EDuke 2.1 mulitiplayer MOD - finaly |
|
![]() |
Bookmarks |
|
|