Aller au contenu

Photo

[Solved] Area Transition via Conversation


10 réponses à ce sujet

#1
phaonica

phaonica
  • Members
  • 3 435 messages
I can't seem to get the simplest noobish area transition to work, could someone help me out? Posted Image

I created a new level called intent.lvl
I created a new area called intent.are that is associated with intent.lvl
Within the area is a waypoint named "intent_waypoint"

I created a conversation. The tree looks like this:

OWNER: Hey, are you talking to me?
 PC: I need a teleport.
  OWNER: You got it.
    END DIALOG

I created a new script called intent.nss and have tried associating it with the lines "OWNER: You got it." and "END DIALOG" and neither work. It dumps me out of the conversation and it doesn't move the player to the intent area.
I've also tried converting the line of dialog into a cutscene, then setting the cutscene's end script to my script, and that doesn't seem to work either.

intent.nss:

void main()
{
   DoAreaTransition("intent", "intent_waypoint");
}


Am I using a bad script, or am I failing to set a variable somewhere?

Modifié par phaonica, 15 mai 2010 - 06:12 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
I'm not seeing anything obiously wrong with what you're doing. It's possible something isn't being exported properly, but if you're seeing the conversation at least that much is exporting. Have you tried re-exporting the level, the conversation and the script, making sure to check the log for error messages?

#3
phaonica

phaonica
  • Members
  • 3 435 messages
I had been trying to add those dialog lines to an existing conversation in the game. Just now, when I created a module from scratch, the conversation area transition worked fine. So it doesn't seem to like my adding the line to existing conversations. I know the conversation is exporting correctly, because I've been changing the dialog string every time I export, so if I can see the changed string in the game I know it exported correctly. Maybe I've been messing with it so much that I have some tags messed up somewhere...

#4
phaonica

phaonica
  • Members
  • 3 435 messages
Ok, this is what I tried.



I have a module created that includes Single Player in the heirarchy (because I don't know any other way to modify original in-game resources).



I deleted all the files I mentioned earlier and started over (except for the conversation file that I did not create but only modified, and intent.lvl which seems to work just fine).



I remade intent.are and associated it with intent.lvl

I added intent_waypoint to intent.are

I attached intent.nss to an existing dialog line in an existing conversation.

I checked all the tags and made sure they are identical to the working module I made earlier that does not include Single Player in its heirarchy.



And the script does not fire.



Am I going about altering existing content the wrong way? It seems to specifically not work because I'm adding the script to an existing conversation and not a custom one.

#5
Proleric

Proleric
  • Members
  • 2 350 messages
Are you certain the script isn't firing? Or only that the area transition isn't happening?

The most common cause of area transitions doing nothing is that the game can't find the destination waypoint.

That might be because the area doesn't exist in your add-in to Single Player.

If you originally made the area in your standalone module, you'll need to copy it to the add-in.

Since the toolset forbids duplicate resource names, you'll have to rename it, too.

If you already did that, did you remember to change the area name in the area transition script, too?

#6
phaonica

phaonica
  • Members
  • 3 435 messages
Sorry, I said that the working module ( without Single Player ) tags were identical to the nonworking module (with Single Player). That is wrong. Everything in the working module is tagged "tuttent" and everthing in the nonworking module is tagged "intent". So I don't have any duplicate entries.

#7
Proleric

Proleric
  • Members
  • 2 350 messages
You could verify that your area has loaded by using Export Options to start the game at your target waypoint. If that's OK, you could check whether the script is firing by displaying a message. If the area is loading and the script is firing, a script typo in the target area or waypoint name might be to blame.

#8
phaonica

phaonica
  • Members
  • 3 435 messages
I enabled the console this morning, so I could attempt to fire the script directly.

I don't think the nonworking (with Single Player) module is recognizing the script at all. When I go into the working module (no Single Player) and use the console to fire my area transition script, it works fine. When I go into the nonworking module and try to fire an area transition script (which has a different name than the working script), it says the script doesn't exist. So, I deleted the nonworking scripts out of my override folder and deleted them from the toolset also. Restarted my computer. Remade the script in the toolset. Compile and save without error. Exported the script without error. Checked to be sure the script files are in the override folder. Attempted to run the script from the console. And it still says the script doesn't exist.

So, the area transition itself doesn't seem to be the problem. The problem appears to be getting the module associated with Single Player to recognize the script at all. This is the first script I've ever tried to make run that is associated with Single Player, so perhaps I have the procedure wrong.

Edit: The error message I get when I try to run the script is "Failure: No such script".

Modifié par phaonica, 13 mai 2010 - 09:02 .


#9
Proleric

Proleric
  • Members
  • 2 350 messages
In module properties, does your add-in have Extended Module set to Single Player?

If that's not set, none of your resources will load when you start the Single Player game.

If that's not the problem, can you see your script in your add-in's override folders?

#10
phaonica

phaonica
  • Members
  • 3 435 messages

In module properties, does your add-in have Extended Module set to Single Player?
 If that's not set, none of your resources will load when you start the Single Player game.

It didn't actually, but I set it this way tried again, and I still can't run the script from the console :(


If that's not the problem, can you see your script in your add-in's override folders?

Yes, the script is in the add-in override folder.

#11
phaonica

phaonica
  • Members
  • 3 435 messages
Solved.



I decided to do follow a different scripting tutorial to see what different instructions might come up, and I came across this:



Note that as of toolset version 1.01 and game version 1.02b, you should NOT use "module_core" as the script (as found in module properties) for an add-in that extends an existing module, otherwise you will encounter issues that may include slow-downs during conversations and attribute allocation. The exact cause of these issues is not yet known, but using a blank script with an empty main function will eliminate these issues.




I created a new script mymod_core.nss with an empty main function and replaced module_core in the module properties. Now the script fires as it should from both the console and the conversation!



Thank you so much for your help!! You really helped me narrow down what the problem was. I'm very appreciative. :) :)