Teleporter

Ask questions, discuss ideas, get answers
Coroner47
Posts: 213
Joined: Tue Nov 24, 2009 5:11 am
Location: Canada

Teleporter

Post by Coroner47 »

Been brainstorming a deployable teleported for couple days. No idea what i would use this for cause i don't like un-realistic mods, but i like challenges. I was thinking i could have a handfirearm deployable pad that would be a pco to enter & on exit would teleport a soldier across the map to a chosen location. The chosen location would be the coordinates of another handfirearm that would work like the artillery call / binoculars. I think i could use the something like this ...

Code: Select all

Var v_PosX = arty x - current x
Var v_PosY = arty y - current y
Var v_Posz = arty z - current z
ObjectTemplate.setSoldierExitLocation v_PosX/v_PosY/v_PosZ 0/0/0
1) Has anyone worked with "Var"... which appears to just define an integer? Also, anyone know how to define characters & strings like the "host" string?
2) Im sure the arty call position x y z would be globally defined integers... anyone know what the defined variable names would be?
3) Anyone know how to use "getPosition" ... i found it in the bf1942.exe?
Image
Pray hard, die fast
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Teleporter

Post by BotHunter »

I don't mean to revive a very very dead thread but has anyone ever figured this out? :)
Walk quietly and carry a sniper rifle
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: Teleporter

Post by Shrooms »

I have not heard of this BotHunter it sounds like something worth looking into if possible serverside I can imagine teleporting both teams to one flag then to another after a while and so on.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Teleporter

Post by fo0k »

if you spawn under the terrain.. you appear on top of it.. but do you technically move up.. or just appear? im thinking that if you spawned very far under the terrain.. and there was an inverted funnel shape above you.. it could feed you to a separate location.. the top of the funnel would be where a soldier placed the exit point.. then you would enter the entry point.. and when you exit (teleport) it would exit you below the bottom of the funnel (funnel base is as wide as entire map) and then you feed up to the exit point.


this is the weirdest idea yet I think. 99% sure its not gonna work..
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Teleporter

Post by Vilespring »

...but the cone can only go to the edges of the map. There would have to be multiple cones. You could also have a static object that you enter that has the exit point where the other end is, and that one goes back to the other. The exit positions would have to be map-specific though.

EDIT: shoot, but it is static. defeats the purpose of portable. ._.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Teleporter

Post by Swaffy »

I've only seen static PCOs on maps that had a far away exit point. To figure out the position of the exit point:

- Place the object (PCO) on the map.
- Place a random (temporary) object where you want the PCO's exit point to be at, you will need this object's "setPosition" coordinates.
- Use subtraction to find out the position coordinates for the exit point. Use the PCO as the reference point and subtract the temporary object's position coordinates from the PCO's coordinates.
- Use these new coordinates as the PCO's exit point position.
- Test it.

Remember that the exit point is attached to the PCO so its coordinates are centered to the PCO.

- = - = - = - = - = - = - - = - = - = - - = - = - = - - = - = - = -

You can also make a deployable PCO object from a HandWeapon, I did this when making a soldier spawner for my mod. But in stead of spawners being attached to the PCO, a player can enter the PCO and the PCO's exit point will be elsewhere. For example, if I wanted to make a deployable parachute point then the PCO's exit point would be really high up in the air so that when a player exits the PCO he will be high up and be able to use his parachute.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Teleporter

Post by fo0k »

Vilespring wrote:...but the cone can only go to the edges of the map.
Well in fact I suppose it would be twice the width so it would work from any position.

If this principle has any legs :)
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Teleporter

Post by Vilespring »

I fail to see what you are saying, maybe a pic for my simple-minded brain? :D
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Teleporter

Post by fo0k »

heheh well... just to clarify the principle ..but in a different way..

imagine a pyramid shape.. that was empty.. and imagine the player spawns near one of the corners of the pyramid.. inside..

now imagine there is negative gravity.. so the moment the player spawns he starts to float up.

he will float up but then hit the roof, inside.. and it will force him towards the center.. highest point..

so wherever he spawns inside the pyramid, he will always move to the point at the point at the top if it..


so... when you spawn underground in this same pyramid shape.. the question is whether the engine does consider any collision mesh above you before just placing you back on the terrain.. if it does then a pretty cool teleport system could be made like this... but.. I doubt it does.. maybe Ill get a chance to try the concept and report back :)


if it did.. then any player would place a teleport exit object anywhere on the map.. this would basically be the top 'point' of the pyramid (but with a hole to actually pass through the top.

and then also a teleport entry point could also be placed anywhere.
you enter the teleport entry.. then when you exit... it's exit location would be far below the terrain and fall into the pyramid thing.. you would drift (instantly..!) up the walls of the pyramid to the point at the top.. which is where the player had placed the exit point.




thats the theory... which yeah Im 99% sure will not work heheh but might.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Teleporter

Post by Vilespring »

It could work, yes. We just need negative gravity.

EDIT: I thought of a much simpler way :)
You have a big plain mesh below the map, so you can stay on it without dieing. The teleporter transmitter is a PCO, where the exit point puts you way down below the map to it. (a problem I see is the thing doesn't move, and you could hurt yourself if you do from a mountain, versus the valley, because it has to be low enough for the constant. maybe the mesh can be a mock of the height map) The receiver, will be also a PCO, but with the entry points layering across the bottom, so that wherever the thing is on top, and wherever the person is below, he can get in it. The exit will be,of course, where the receiver is.

EDIT #2: the receiver can also be a spawn point when I come to think of it, because, why not? there will also have to be a way back up for people who go down to the bottom without a receiver up.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Post Reply