playMaker

Author Topic: Event for making a collected piece of paper and that will display on your screen  (Read 2747 times)

wodan944

  • Playmaker Newbie
  • *
  • Posts: 2
Hi, I'am new to playmaker and wanted to use it for a Adventure game that I'am currently creating in Unity.

I know how to make a trigger event for let's say a page or a scroll that you collect with a nice particle effect but I want to get this object also appear on my screen as a big image so you can read the text on it
In many adventure games you see a page or a scroll with text lying on a table or floating above the ground, and when you clicked or run through it you can see it in full size on your screen. I want to know  how to make such event.
Is there someone who can help me with some tips or already made such a event?

Thanks in advance

kiriri

  • Hero Member
  • *****
  • Posts: 506
there's a bunch of ways to do this, so I'll just state the most direct one. Create a second fsm on your scroll with an empty start state and a second state, not connected to the start state, which is triggered by a global event, like "pickup". For a scroll, this state would contain something like:
get rotation (camera) = CameraVector3
set rotation (scroll) = CameraVector3
set parent (scroll) = camera
set position (scroll) self = 0/0/1

Now the set position self means that you can offset it on one axis to be readable by the camera. 0/0/0 would be the position of the camera.
You can just make a practice out of having this FSM on every object, and then change the content of the pickup state according to what it is you're picking up. So by default whenever you're character controller is triggering something, it will take that object and send the pickup event and every objet will react to it out of the box. No setup needed.
« Last Edit: June 20, 2012, 02:45:51 PM by kiriri »
Best,
Sven

pustur

  • Guest
you could set 2 FSM. the first one waits until the paper gets pressed (mouse down) then it goes in the second FSM where a "Draw texture" action is called. here you can set an image of your paper. this FSM will show the image until a key of your choice is pressed and then it returns to the first FSM.

could this work for you?

wodan944

  • Playmaker Newbie
  • *
  • Posts: 2
@Piriri: what I understand from your replay is that I should make a scroll or paper with readable text on it and then let the cameras do the work, like zooming in on it?
Will that not affect the readable quality of the text on the scroll?
I think the solution that's comes closer to my goal is the way that Pustur describes, a second image of the scroll that is showing a bigger image of the scroll on the screen.
Anyway I will thank you both for the quick replay.

kiriri

  • Hero Member
  • *****
  • Posts: 506
the readability will most likely be determined by the imported resolution and filters of your texture. If it's easily readable as a GUI, it should be readible as a mesh too, especially if you added a light in that instance and deleted it after the player has finished reading the thing.
However, I agree with pustur that of course a GUI would be much easier if you don't mind the paper actually looking a bit different than it did lying on the ground.
Best,
Sven