Aller au contenu

Photo

Scripting World Map


8 réponses à ce sujet

#1
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
I am new to dragon age scripting here is my broken placeable script


#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"

void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);
    string sDebug;

    switch(nEventType)
    {
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: A creature has clicked on this placeable
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_USE:
        {
            object oUser = GetEventCreator(ev);
            DisplayFloatyMessage(oUser, "Used object!");

            object oMap = GetObjectByTag("map_resourcesov");
            WR_SetWorldMapPrimary(oMap);
            OpenPrimaryWorldMap();
            break;
        }
    }
}

I want the script to open the word map when they use my object.  The script changes the active world map which is half of what I want it to do but it never opens the world map.  Can some one please point me in the right direction.

Thanks

Modifié par Dragon-Slayer, 20 décembre 2009 - 06:35 .


#2
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
This is very strange when I put a similar script on a conversation the world map opens up with no problem. Is it because the code I wrote for the placable has the placable trying to open the world map instead of the player?

#3
Craig Graff

Craig Graff
  • Members
  • 608 messages
Is that the script in its entirety or are you passing EVENT_TYPE_USE on to placeable core? If you are passing the event on it is quite possible that you the map is opening up, but then being immediately closed again.

#4
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
No that is the entire script. Is their no assigncommand function or equivalent in DA?

#5
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
Is the script assigned to the placeable?

#6
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
Yes the script is assigned to the placable other wise my test text DisplayFloatyMessage(oUser, "Used object!"); would not fire nor would the primary map change to a new map the next time I bring up the world map via a transition.

#7
DarkJin83

DarkJin83
  • Members
  • 37 messages
Did you set the placeable send event to 1 in the variables?

#8
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
What variable exactly do you need to set to 1?

#9
Dragon-Slayer

Dragon-Slayer
  • Members
  • 8 messages
If anyone else was having issues I solved the problem you need to have

WR_SetWorldMapGuiStatus(WM_GUI_STATUS_USE);

come before OpenPrimaryWorldMap();



Thanks for all the suggestions happy scripting