I have a dilemma. I have a PRCSCR set up so that a script fires whenever it enters an area on the denerim area list. The script adds one creature to the market and another creature inside the Wonders of Thedas shop. The script will create the creature in the market but will not create the creature inside the shop.
This works:
[dascript]
if (GetTag(oArea) == "den200ar_market")
{
CreateObject(OBJECT_TYPE_CREATURE, R"kc_den230cr_professor.utc", lMarket);
}
[/dascript]
This doesn't work:
[dascript]
if (GetTag(oArea) == "den230ar_wonders_of_thedas")
{
CreateObject(OBJECT_TYPE_CREATURE,
R"kc_den230cr_professor.utc", lThedas);
}
[/dascript]
Can anyone shed any light on this mystery?
Using PRCSCR to spawn creature
Débuté par
Karma
, août 16 2010 01:44
#1
Posté 16 août 2010 - 01:44
#2
Posté 16 août 2010 - 02:08
I would suggest doing a couple of things -
1. Check that lThedas is a valid location.
2. Check that the if condition is being entered by adding a PrintToLog or DisplayFloatyMessage command inside the braces.
Lastly, I remember some discussion back where other people have had trouble spawning into an area that is part of an area list but is not the first area that is loaded. You might be running into the same issue. I don't recall if that was ever resolved though.
1. Check that lThedas is a valid location.
2. Check that the if condition is being entered by adding a PrintToLog or DisplayFloatyMessage command inside the braces.
Lastly, I remember some discussion back where other people have had trouble spawning into an area that is part of an area list but is not the first area that is loaded. You might be running into the same issue. I don't recall if that was ever resolved though.
#3
Posté 16 août 2010 - 02:52
If all else fails, you could split it up and have the second creature spawn when you actually enter the Wonders of Thedas.
Hrm, makes me wonder, when do the area load events fire for an area list? You may have to use event_type_enter in the Wonders of Thedas area script.
Hrm, makes me wonder, when do the area load events fire for an area list? You may have to use event_type_enter in the Wonders of Thedas area script.
#4
Posté 16 août 2010 - 03:25
The first thing I tried was double-checking my spelling and location. Unless there's a minimum distance from interior structures that creatures can be spawned, the location should be valid.
When I inserted a floaty message, it didn't show up. I'm not sure where to go from here.
I tried splitting it up. Still the same problem.
EDIT: I found this thread (http://social.biowar...1/index/2666851), but it didn't seem like there was an elegant solution to this problem.
Another somewhat related question: Is there a plot flag for the destruction of Lothering (or perhaps some sort of GetWorldMapLocationStatus function)? I know Lothering is automatically destroyed when a player finishes a major plot, but does it have its own plot flag? I'd like one of my creatures to spawn in Lothering if it's still around or in Denerim if Lothering has already been destroyed.
When I inserted a floaty message, it didn't show up. I'm not sure where to go from here.
I tried splitting it up. Still the same problem.
EDIT: I found this thread (http://social.biowar...1/index/2666851), but it didn't seem like there was an elegant solution to this problem.
Another somewhat related question: Is there a plot flag for the destruction of Lothering (or perhaps some sort of GetWorldMapLocationStatus function)? I know Lothering is automatically destroyed when a player finishes a major plot, but does it have its own plot flag? I'd like one of my creatures to spawn in Lothering if it's still around or in Denerim if Lothering has already been destroyed.
Modifié par satans_karma, 16 août 2010 - 04:21 .
#5
Posté 16 août 2010 - 05:05
That's what I thought - the game somehow fails to find the correct area to place the object in. You might have to override the associated area script to get it done.
For Lothering, check the mnp000pt_main_events - its in the Main Plot section instead of Lothering.
For Lothering, check the mnp000pt_main_events - its in the Main Plot section instead of Lothering.
#6
Posté 16 août 2010 - 01:50
I think the PRCSCR script gets only called when you enter the AreaList from a different AreaList. Thus, when entering the Wonders of Thedas, no PRCSCR script will be called since you're not changing the current AreaList. Unless you save and reload.
Spawn everything when entering the AreaList the first time.
You should be able to use
object oArea1 = GetObjectByTag("den200ar_market");
object oArea2 = GetObjectByTag("den230ar_wonders_of_thedas");
Both should return valid objects in the Denerim Market Place (did not verify). Derive a location from each of them for your creatures. Create the creatures. If, for whatever reason, you can't see the spawned creatures, try using SetLocation() on them immediately after creating them (same location as where you created them).
Also, if you still can't see the creatures, check whether they're actually valid with some helper script or something.
Spawn everything when entering the AreaList the first time.
You should be able to use
object oArea1 = GetObjectByTag("den200ar_market");
object oArea2 = GetObjectByTag("den230ar_wonders_of_thedas");
Both should return valid objects in the Denerim Market Place (did not verify). Derive a location from each of them for your creatures. Create the creatures. If, for whatever reason, you can't see the spawned creatures, try using SetLocation() on them immediately after creating them (same location as where you created them).
Also, if you still can't see the creatures, check whether they're actually valid with some helper script or something.
Modifié par Trylane, 16 août 2010 - 02:08 .





Retour en haut







