Teleporters

Started by Breakdown, June 16, 2009, 06:21:31 AM

Previous topic - Next topic
Hi guys

I know this probably isn't the best place to ask (we don't have many modders), but do you think teleporters are posible to make in SWBF1? I've seen it in SWBF2, but I can't think of anything how it could work in SWBF1.

Thanks,
BD

Can you explain how it was done in SWBF2 if you happen to know?
QuoteSow the wind and reap the whirlwind
Through the rain and through the shine
Only something with a meaning can stand the test of time

its handeled in bf2's Zero Editor, and not possible in bf1, but you could possiby make and underground tunnel and skin it like a 'portal'  :shrug: and make it lead to were you want

I find that most things in SWBF2 that are not thought to be possible in SWBF1 are, they just have to be looked at in a different way, can i get a name for a map with a teleporter in it from SWBF2?
QuoteSow the wind and reap the whirlwind
Through the rain and through the shine
Only something with a meaning can stand the test of time

i dont believe it was used in any stock maps, but i know it is used in "games complex" by the itfactor and that map is not released

Yes, that was where I saw it, wasn't it in another one of his maps?

Quote from: "MileHighGuy"its handeled in bf2's Zero Editor, and not possible in bf1, but you could possiby make and underground tunnel and skin it like a 'portal'  :shrug: and make it lead to were you want
It's not done at all in zero editor; it's a lua-only thing. You can use a number of things to make it happen (some of which you can place in ZeroEditor), but it is entirely depended on how different the lua functions are between 1 and 2.

Look at the tutorials on Gametoast for how to do it, I assume you can still do paths and regions in SWBF1 ZE. That is all you need for the simplest version. If the code doesn't work (if you can't grab entity matrices like in 2), then it won't work.

Thanks Mav, I'll look into it..

function(regIn,character) I'm pretty sure this line alone would not work in SWBF1 as making units regin is not possible in SWBF without taking a life i'm pretty sure? and i would highly suggest its not possible to keep the current stats/health, meaning it would be a free way to get full ammo/health.
QuoteSow the wind and reap the whirlwind
Through the rain and through the shine
Only something with a meaning can stand the test of time

Quote from: "Hardcore"function(regIn,character) I'm pretty sure this line alone would not work in SWBF1 as making units regin is not possible in SWBF without taking a life i'm pretty sure? and i would highly suggest its not possible to keep the current stats/health, meaning it would be a free way to get full ammo/health.
"regIn" is not "regen;" it doesn't matter what that's called, it's just a function input.

It's also worth mentioning that the line of code you posted is completely arbitrary because what's going on behind the scenes is a GetPathPoint() and then SetEntityMatrix() for whatever character enters a region.

Like I said, the code is simple. I don't remember exactly what that tutorial says, but the gist of a "teleporter" as it describes (enter region, move to path node) works like this:
1) Define a region in ZE (name and properties are the same, call it "teleregion" or whatever)
2) Make a path in ZE (call it whatever you want; ex "telepath")

All the region serves is the purpose of getting data for the character because OnEnterRegion is an easy way to do that. Some sample code might look like this:

ActivateRegion("teleregion")
teleportbasic = OnEnterRegion(
function(region, player)
if player then
SetEntityMatrix(GetCharacterUnit(player), GetPathPoint("telepath", 0)
end
end,
"teleregion"
)
In the above code:
teleportbasic: arbitrary variable set equal to the function for clarity's sake
"GetCharacterUnit(player)" may just need to be "player", I don't remember offhand and don't have any of my code nearby to check.
GetPathPoint("telepath", 0): first input is path name, second is path node (path node 0 is the default first node in a path)

It's really easy to set up, but if SWBF1 luas don't support the OnEnterRegion() function or any of the other callbacks used above (notably important is SetEntityMatrix); then there's no real effective way to do what you want.

I tired a quick tutorial Penguin made on GT, but I only really tried it once and it didn't work, though knowing me there was a mistake I didn't bother rechecking because I got sick (No, I really did, not an excuse :P)

I will try out what you have posted Mav, thanks a ton! Very helpful

hey, I came up with an idea for how this could be cool

There is a 3-section battlefield. Each section is completely isolated from the other, with no way to cross the barrier other than by teleport. Each side of the field is identical in shape, but you can have one futuristic, one now, and one in the past. This way it's a time machine. Possibly each one comes out near a CP that is usually the enemy's to symbolize the change in power over time

just an idea

Viruses are like the New York Lottery. "Hey, you never know"

Now that's a cool idea Pi, I've always liked the idea of a fractured time and place map...
Perhaps one part of the battlefield could be of one place in some obscure era,
while other two areas are completely different ! Crazy !