Forum rules - please read before posting.

Inventory slot setting & "Return to last Gameplay" transition time & Player move to marker head tilt

Sorry for posting a lot lately.
I have three questions that I haven't been able to solve. These are all for First Person.

  1. Is it possible to set a dedicated slot in an inventory box for a certain inventory item?
    I have 12 items in a set category that I show in an inventory box. The items are used on hotspots for a puzzle and returned to inventory, put back on another hotspot etc. If possible, I'd like these items to always return to the same slot in the inventory box.
    I've played around with AC.MenuInventoryBox.GetItem and int AC.MenuInventoryBox.GetItemSlot and storing this in a component variable with the hotspot, but cannot get it to work properly with runtimeinventory. Please let me know if I'm on the right track to achieving the desired result.

  2. After switching back from a "Simple Camera" using "Return to last gameplay", the "transition time" is ignored. It just snaps back to the last gameplay position. It's the same result if I put the "FirstPersonCamera" as the camera to switch to. Please see attached for camera inspector info. What do I need to change to get a transition time?

https://imgur.com/a/ucBXMIQ

  1. When using "Object:Transform", "Move Player" and "Copy Marker", the player moves as desired to the marker, with the head tilt staying the same. However, I want to change the head tilt as well to face straight forward, i.e. same as the marker rotation. How can I achieve this?

Sorry for a lot of novice questions. It was 40 years ago since I did Commodore64 BASIC programming...

Comments

  • edited April 2023

    Is it possible to set a dedicated slot in an inventory box for a certain inventory item?

    GetItemSlot is the way to go about getting the slot that a given item is in.

    To place an item in a specific slot, though, you'll first need to make sure that Items can be re-ordered in Menus? is checked in the Settings Manager, which allows for Inventory boxes to have empty slots.

    To place an item into the inventory at a given slot, use the Insert function:

    KickStarter.runtimeInventory.PlayerInvCollection.Insert (myInvInstance, myIndex, OccupiedSlotBehaviour.FailTransfer);
    

    An explainer on InvItem vs InvInstance classes can be found here.

    What do I need to change to get a transition time?

    When entering gameplay in First Person mode, the First Person camera is switched to automatically - and this'll be instant as soon as gameplay begins. To get the transition, make sure that Wait until finish? is checked in the Action, and that the ActionList itself blocks gameplay.

    I want to change the head tilt as well to face straight forward, i.e. same as the marker rotation.

    If the Character: Face object Action is used to move the Body of a First Person Player, an additional Affect head pitch? option will appear to have the camera be affected vertically as well.

    It was 40 years ago since I did Commodore64 BASIC programming...

    5 PRINT "Those were the days";
    10 GOTO 5
    
  • Yes, all works great!!!

    10 FOR I=1 TO 10
    20 POKE 53281,1
    30 POKE 53280,6
    40 PRINT "THANK YOU";
    50 FOR J = 1 TO 1000:NEXT J
    60 POKE 53281,0
    70 POKE 53280,0
    80 PRINT " ";
    90 FOR J = 1 TO 1000:NEXT J
    100 NEXT I
    110 END
    
  • Sorry to revive an old post, but I still most often cannot get the "return to last gameplay" transition to work. It just snaps back to the first person camera that was active before switching cameras.

    Please see attached action list.
    https://imgur.com/a/loMexM5

    I assume I am doing the same mistake in all cases where the camera snaps back to the first person camera.

  • You say "most often" - is there a pattern to when it occurs vs doesn't?

    The ActionList looks correct - the transition is waiting until it finishes, and the ActionList itself blocks gameplay.

    If you add a Dialogue: Play speech Action after this Action, does the speech display before or after the camera switches back?

  • I've tried to find a pattern, but unfortunately not found one.
    I put a Dialogue:Play speech (narration) at the end of the action. The text displays at the same time as the camera starts to move back and now it doesn't snap, but instead transitions back smoothly. Narration is set to "Display forever until user skips it". If I set the play speech to Player line, the transition will be smooth until the text has scrolled out and then it snaps back.

  • Odd. From that, it sounds like the Camera: Switch Action's Wait until finish? option is being ignored.

    You could get things working by unchecking it, and instead ending the list with an Engine: Wait Action to match the transition time. That shouldn't be necessary - but it's not an issue I can recreate.

  • Yes, that works. Thanks. Still seems a bit suboptimal though, but all good.
    In one case, I had the "Return to last gameplay" as the last action in a button action list where the menu itself was "Except when paused" and it snapped back, but when I changed the menu to "manual" it transitioned smoothly. I had to change all "lock menu" to "display menu" though, but the result is fine.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.