Questions about a teleporter (solved)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Questions about a teleporter (solved)

Post by Fiodis »

How do you properly set up the teleporter region/node? I know there's a tutorial, and I've followed it; but my teleporter refuses to work. What layer do you have to add the teleport region and node to? And in the tutorial it says to rename the node to "teleporter node" or something like that. Does that mean rename the path or the node itself? If it's the node, how do you rename a node? And what shape does the teleporter region have to be?
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: Questions about a teleporter

Post by RepSharpshooter »

Make a region, doesn't matter which layer it's in, or it's shape. But you do want to name it exactly what the tutorial says. You also need to make the region type be the region's name or else it won't work. Also make sure you have ActivateRegion("name") somewhere.

You rename the entire path teleport node or whatever the tutorial calls for (but it's a path with only 1 node).
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Questions about a teleporter

Post by Fiodis »

I copied and pasted everything directly from the tutorial - names and scripts.b Didn't work.
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: Questions about a teleporter

Post by RepSharpshooter »

Then it's impossible to debug unless you check it over again. You can't expect anyone to help if you don't give anything but "it didn't work."
RepSharpshooter wrote:You also need to make the region type be the region's name or else it won't work
especially check that.

Also put

Code: Select all

print("Hey I made it to the <insert name here> function")
in everywhere to see what the lua is doing. Make sure it's triggering an on enter region event
then make sure it's calling the move entity to node function

You can see the printed text in the modtools log.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Questions about a teleporter

Post by Fiodis »

You can't expect anyone to help if you don't give anything but "it didn't work."
Sorry about that.

Here's the mungelog, I can't believe I forgot to use the debug tool. I was testing in normal fullscreen game mode. It does mention something, but I can't make sense of it.
Hidden/Spoiler:
Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 448

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 452
Hey I made it to the OnEnterRegion function

Message Severity: 2
.\Source\ActiveRegion.cpp(186)
Region "TeleportRegion" not found
ifs_sideselect_fnEnter(): Map does not support custom era teams
ifs_sideselect_fnEnter: The award settings file does not exist
The first two severity 3's are unrelated, I just included them to show the "Hey I made it to the OnEnterRegion function" line in relation to other errors. Under it is the one that I'm confused about. I do have custom teams, but they work. So why does the map not support them? And what award settings are they talking about?
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: Questions about a teleporter

Post by RepSharpshooter »

Did you put the "hey I made it to on enter region" INSIDE of the function? or before it?

Because with

Code: Select all

Message Severity: 2
.\Source\ActiveRegion.cpp(186)
Region "TeleportRegion" not found
It does not make sense that the on enter region would even work.

Did you verify that the region is in ZE in a layer that is being loaded (base layer or the mode's layer i.e. conquest).

And PLEASE answer me, did you set the region's name AND TYPE as: TeleportRegion ?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Questions about a teleporter

Post by Fiodis »

And PLEASE answer me, did you set the region's name AND TYPE as: TeleportRegion ?
Hidden/Spoiler:
Image
Yes.

And the upper section of my LUA:
Hidden/Spoiler:
[code]OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"TeleportNode")
end,
"TeleportRegion"
)
print("Hey I made it to the OnEnterRegion function")
ActivateRegion("TeleportRegion")

end[/code]

EDIT - I'm so sorry. I don't know how I could've missed it. I was watching out for just this sort of thing, and it got me. I'm sorry. Looking at my own ZE pic, I see it now.



The region in the LUA is TeleportRegion. The region in ZE, however, is Teleport
erRegion. Ditto for the path. I can't believe that slipped past me. :oops: I'll fix it and try it out. Thanks for everything, Rep. And sorry about that.

EDIT 2 - Wait! It wasn't my fault. I looked back through the tutorial, and it tells you to name it "TeleporterRegion" but the code it gives you mentions "TeleportRegion". That's why I messed up while following the tutorial exactly; the tutorial was slightly faulty. Someone ought to fix that.

The tutorial I looked at.
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: Questions about a teleporter

Post by RepSharpshooter »

Ah, always good to make sure names are the same :) (oh, and no need for red and blue text [the rules say no stylized text])

Tutorial edited as well.
Post Reply