FIrst Person adventure

  • #1, by SomeoneMonday, 14. April 2014, 02:02 6 years ago
    Hello, I'm new to this program, but I already know how to do the most important stuff. I would like to ask how to make a first person adventure in this software?

    I tried to create character with no clothes and then assing it to an object, but then all of my texts are aligned to the left upper corner, I tried everything to move them somewhere else but no luck.

    Then I tried to make an NPC, but Its again in the left upper corner always, wont move.

    So my question is how to setup first person character and how to align stuff where I want it.

    I added image with explanation, because my english is not really great.

    I would preffer to do this without scripts please. Thank you.

    Newbie

    11 Posts


  • #2, by afrlmeMonday, 14. April 2014, 03:37 6 years ago
    if it's first person & the character speaking is first person then use the narration (speaker) text action part found under miscellaneous. It can be absolute positioned anywhere.

    In regards to your npc/dummy character: it's probably placing the text to the top left because you haven't added any images to the character to define the character width/height (use some small transparent png images 10x10px or something) & you also need to set character center too.

    Also to position your npc's to a default position inside of a scene, you need to create a scene object & set the character position for the object & then assign the character to said object via the characters properties tab.

    Nigec on here would be the best person to ask about anything else first person related in vs. Here's a demo he made showing how to create first person game. http://www.visionaire2d.net/downloads/Zeppelin_First_Person.zip

    Imperator

    6805 Posts

  • #3, by brut69Monday, 14. April 2014, 03:56 6 years ago
    This can easily be done with the "Immediate Execution" for your character to be working like it is in 1st Person view.
    The text can also be placed anywhere too by creating an empty (1x1 transparent pixel) character (thats how I do it) and placing him on the location that you want the text to appear.

    Great Poster

    262 Posts

  • #4, by SomeoneMonday, 14. April 2014, 12:14 6 years ago
    Thanks, but I tried this already and I think I'm missing something because it didnt help

    Newbie

    11 Posts

  • #5, by SomeoneMonday, 14. April 2014, 12:16 6 years ago
    The narration text wont show on the screen :/

    Newbie

    11 Posts

  • #6, by afrlmeMonday, 14. April 2014, 12:32 6 years ago
    The narration text wont show on the screen :/


    I believe it's a bug in 4.0 beta. An updated RC version with various bug fixes should be out shortly.

    Could you share a few more screenshots of how you've set up the npc/dummy character, the way system for the scene (borders) & where you've placed the object the character is linked to please?

    Also quick note: all scene objects have to be in the correct order based on their object center. If they are not in the correct order then it can have some strange side effects... click on the double yellow arrow icon to automatically arrange the scene objects according to their object centers.

    * edit: ah right you are wanting to place the text at the bottom of the screen? I had difficulty reading the dark red text against the colors of your scene. If you're not using narration text then the best method is with the registerHookFunction - yes I know it's a script but it's not a difficult script. Plug & Play. wink
    local dRes = game:getPoint(VGameWindowResolution) -- store window width
    local val = 100 -- amount of pixels to offset from the bottom of the screen (change this to whatever you want)

    function hText(text)
    if text:getLink(VTextOwner):getId().tableId == eCharacters and text:getLink(VTextOwner):getName() == game:getLink(VGameCurrentCharacter):getName() then
    text:setValue(VTextPosition, {x = (dRes.x / 2), y = (dRes - }); return true
    else
    return false
    end
    end

    registerHookFunction("setTextPosition", "hText")
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

    Just create a new script in the script editor, set it as definition script via the properties tab & then copy/paste the script above into the script editor section. I've not tested this script but it should work. It will automatically center the current characters text to the center of the available screen space & offset it from the bottom by the val amount.

    If you want it to position all characters text in the same position then just remove this bit from the script above.
    and text:getLink(VTextOwner):getName() == game:getLink(VGameCurrentCharacter):getName()
    1
    2

    Imperator

    6805 Posts

  • #7, by SomeoneMonday, 14. April 2014, 14:55 6 years ago
    Here are some screenshots. I gave up with the text which is still in the left corner, Im trying to figure how to place the NPC where it should be first.

    I have info text on click on the axe and the guy at the right bottom corner. Both texts shows in the left upper corner, but I want them on the cursor position or atleast next to the item.

    Newbie

    11 Posts

  • #8, by SomeoneMonday, 14. April 2014, 14:57 6 years ago
    And I learned everything from these tutorials: http://www2.visionaire2d.net/glenfx/

    Newbie

    11 Posts

  • #9, by SomeoneMonday, 14. April 2014, 15:01 6 years ago
    Okay the narration text started to work somehow now, but its now in the center instead where I positioned it ( next to the axe )

    Newbie

    11 Posts

  • #10, by afrlmeMonday, 14. April 2014, 15:12 6 years ago
    The tutorials from Glenfx are a little bit outdated, so not everything in them applies to 3.7.1 or 4.0 beta.

    Why have you assigned an image to the start character object? Also have you set the objects position that the character will be placed at? (see attachment)

    Imperator

    6805 Posts

  • #11, by Simon_ASAMonday, 14. April 2014, 15:15 6 years ago
    The best is to start with the Zeppelin scene and update it with your own pics. Take your time to change all the settings so they fit your expectations (resolution, cursors, etc.)
    http://www.visionaire2d.net/downloads/Zeppelin_First_Person.zip
    That's what I did with my game Catyph, 1st person adventure too.
    For the text in such a game, use the action called Display Speaker Text (renamed to Narration Text in V4). You can display it anywhere on screen. Good luck!

    Great Poster

    321 Posts

Write post