SCUMM template (Visionaire RC0)

  • #10, z sebastianMonday, 08. May 2017, 19:28 hodinky 8 years ago
    use this inside an "execute script" action part inside the game start action:
    setWindowSize({x=640,y=480})

    Kapitán

    2346 Posts


  • #11, z afrlmeMonday, 08. May 2017, 19:30 hodinky 8 years ago
    in AGS there was a launcher for that. Let say I have my game at 320X200 and I want window mode and 640X480. I can't do this?!
    If you run the game in fullscreen mode it will automatically scale up/down to fit the users desktop resolution (while keeping proportion/aspect ratio) or if you launch in window mode then it will scale up/down to whatever resolution you set in the config.ini.

    Quick note: not sure if it's a bug but when editor is set to fullscreen &/or widescreen option is enabled then it always forces fullscreen & ignores what's in the config.ini file. If you want to test between window/fullscreen mode & different resolutions then you need to disable fullscreen & the widescreen option under: extras > options > player...

    Imperátor

    7285 Posts

  • #12, z gabartsMonday, 08. May 2017, 19:44 hodinky 8 years ago
    OK, thank you both! Before I read this I actually managed to launch it in fullscreen modifying the config file. For the moment is good... smile

    Fanoušek fóra

    137 Posts

  • #13, z gabartsWednesday, 10. May 2017, 12:35 hodinky 8 years ago

    I'm not going to use this type but I've seen that when you use option draw action text at cursor it moves slight and is toward right part of the cursor. Is there a way to fix the action text above or below the pointer like in the picture?

    Also the go to and other commands should not show up until you get an hotspot, how to set this?

    In the maniac mansion template the action text is set to "not draw action text" but the scumm seems more draw action text in a rectangle (above the inventory and verbs).

    Fanoušek fóra

    137 Posts

  • #14, z sebastianWednesday, 10. May 2017, 13:06 hodinky 8 years ago
    do you need both: an object name at cursor and an actiontext on what to do with it  at the bottom?
    Action text is -to my knowledge- always a combination from (optional) action text AND object name. Showing one text at the cursor and another in the bar would be a bit problematic because its always the same text and maybe this needs a bit of lua scripting to solve this (actually show something else than an action text at the cusrors position).

    Kapitán

    2346 Posts

  • #15, z gabartsWednesday, 10. May 2017, 16:52 hodinky 8 years ago
    No they are 2 different types of action text. The one at the cursor is the one you can see in the recent Thimbleweed Park and is showing only when an hotspot is reached. The other is the classic one which i've used for my game.

    Fanoušek fóra

    137 Posts

  • #16, z sebastianWednesday, 10. May 2017, 17:27 hodinky 8 years ago
    No they are 2 different types of action text. The one at the cursor is the one you can see in the recent Thimbleweed Park and is showing only when an hotspot is reached. The other is the classic one which i've used for my game.


    i know. But what do YOU need here? display only one or both at the same time? =D

    Kapitán

    2346 Posts

  • #17, z gabartsWednesday, 10. May 2017, 20:34 hodinky 8 years ago
    The bottom is easy to set up. I'd like to know if it's possible to change where the action text will appear when is following the cursor.

    Again, my questions are:

    How to change action text position when is drawn with cursor.

    How to make action text appear only when cursor is over hotspots (of course when you click directly on verbs it shows up).

    Fanoušek fóra

    137 Posts

  • #18, z sebastianWednesday, 10. May 2017, 21:11 hodinky 8 years ago
    ok....

    i think with the default action text option you can make is not a suitable option here. You have no possibility to rearrange the text position for this. So select "do not draw action text" here.

    Nevertheless you are able to set action text boxes for interfaces, too. So the texts here can be bound to an interface and the interface can be moved to cursor.x / cursor.y - 10 to display the interface 10 pixel above the cursor. The tricky part here is to reposition the interface on mouse movement.

    for starting purposes set up an additional interface , call it "action_text", no need for any buttons or background and define an action text area in it via the Action Area tool:

    (third icon with that "T" in it). Draw a small rectanlge at the top. It doesnt need to be big because the action text which gets displayed can break the boundaries...

    in the interface properties set the position "ABSOLUTE" and define some offset  (if later needed - maybe gets anyway overwritten by the script you need to update its position)
    Also enable the checkbox "show action text".

    check the checkbox in the characters interface tab , so that the char can use this interface.


    Go to the script workspace in Visionaire and add a definition script. Add this:

    function onMouseEvent(eventType, mousePosition)
     if eventType == eEvtMouseMove and (game.CurrentObject:getId().tableId == eObjects or game.CurrentObject:getId().tableId == eCharacters) then
       Interfaces["action_text"]:to(0, { InterfaceOffset = {x = getCursorPos().x, y = getCursorPos().y - 10 } })
      else
        Interfaces["action_text"]:to(0, { InterfaceOffset = {x = 0, y = -100 } })
     end
    end
    registerEventHandler("mouseEvent", "onMouseEvent", {eEvtMouseMove})

    if the mouse is not under any object/character , the interface gets "ported" to 0 / -100 to prevent the text from jumping around


    the 10 is the offset to the current cursor position. So "-10" would reposition that interface 10 pixel above the cursors y position.


    EDIT: tested , added some corrections to my text
    EDIT2: edited a some major points grin

    EDIT3: for the "go to" verb you dont need to set any Command name. By that the standard "go to" command/cursor has no visible text.



    Kapitán

    2346 Posts

  • #19, z gabartsThursday, 11. May 2017, 11:11 hodinky 8 years ago
    Thanks! I'll give a try and make some modifications if needed. Well you can add "go to" as command line text, the same with the other verbs, especially if you are going to script everything with object text for verbs.

    But it looks nice, even if I don't understand why the text is cloned at the bottom smile

    Fanoušek fóra

    137 Posts

  • #20, z sebastianThursday, 11. May 2017, 11:26 hodinky 8 years ago
    the bottom text is my default action text rectangle. completely unrelevant here. i did not remove it because thats where i normally habe it in my game smile 

    Kapitán

    2346 Posts