View Full Version : Creating tractor beam
Guest
07-05-2001, 06:33 PM
In another game I have there is a tractor beam which can be used to attach your self to buildings and basically fly. It sends a beam from where you are to whatever your aimed at then pulls you straight at. I know I'm gonna be doing some con file editing, but I need some ideas on how to make it. Would onesided sprites work? Probably not but that and teleports are all i could think of. Thanks!
Guest
07-05-2001, 06:43 PM
Ok. I thought about it longer and I don't know if this is possible at all but here goes. When you hold the button it creates a verticle and horizontal onesided invisible sprite so it pushes you up and forward towards where you are aimed then gets rid of them and sets up another two to push you further until you reach where you aimed at. Can anyone build on that or something?
Usurper
07-05-2001, 09:08 PM
Sounds like you're after Lithium Quake 2's laser grappel. Ferry made a passable verticle grappel a while back (grappeling iron example, pro'ly available at http://members.nbci.com/HCAD). I doubt this would be satisfactory for you though. You might be able to do it in eduke by
1. shooting a shotspark
2. simultaneously shoot a homemade stream of projectiles that hits the wall at almost the same time as the shotspark. The danger here is spawning too many sprites in an attempt to make a decent looking beam.
3. get the x/y/z angle of the shotspark and the player and determine how to move the player by manually setting the player's x/y/z coords until they hit the wall.
The problem with this is that it requires more than basic math. I'm not up on trig and other advanced concepts, partly because my high school math teacher wasn't very good, and partly because I don't have the will to figure them out for myself. (Maybe when someone shows me how advanced math is useful for static art and writing I'll have a go at it.). If you can figure it out or find someone willing to show you how, best of luck.
Bruce Hamilton
07-06-2001, 07:15 AM
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>...but that and teleports are all i could think of.<HR></BLOCKQUOTE>
Don't forget you've also got the jetpack. Not what you're looking for, but that might not be possible.
Guest
07-06-2001, 03:53 PM
Well the math is quite easy. I have to get the y coordinate of duke and where I shot at then take the y of the shot - the y of duke then divide by the distance between duke and the wall. Then that will give me how much lower of higher the horizontal sprite has to be and the vertical sprite just keeps pushing me towards it. I just don't know how to do it in the con's. I'm not really experienced enough yet. I was just gonna use the space bar for it or open which ever the cons can test to see if its hit. Maybe that would help. I have and invisible onesided sprite already made for ladders that i was going to use. Does that help at all. I know the geometry i just dont know how to do it in the cons if it is even possible. And I'm not really wanting to use eduke on this. I want it for just normal duke. Thanks!
Guest
07-06-2001, 04:09 PM
Ok well i just saw the move command so is there a way to get the x/y/z coordinates of a exploded shink ray? I'm thinking of using that since i dont like the gun very much. I think i can do the rest after that... i think.
Usurper
07-06-2001, 08:23 PM
Can't get x/y/z coords without eduke. Frankly, I don't see the point in ever using normal duke for mods.
Guest
07-06-2001, 08:37 PM
So there is no way to do it?
sir_plague
07-07-2001, 01:27 AM
Um, I don't know why I'm posting this since it isn't possible w/o eduke, but the shrinker explosion is a seperate actor which is named SHRINKEREXPLOSION I believe. If not well, sorry.
[edit]damn I can't type.
[ 07-07-2001: Message edited by: sir_plague ]
Usurper
07-07-2001, 08:22 AM
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by staind234:
So there is no way to do it?<HR></BLOCKQUOTE>
I've tried something similar before, but I couldn't get wall-aligned sprites to push the player. They moved to the player and were then blocked. Of course, my coding is rarely perfect the first time around, so maybe I just did it wrong. It _might_ be possible, but I doubt it.
Guest
07-07-2001, 04:15 PM
Well thanks anyways for all your help.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.