Hi again
I was wondering if is possible after u pick an item to have a custom pop up (3d or 2d) to emphatize better what did u took...
I'll try to explain better: a piece of paper for example. I go near the piece of paper. I select "take it" then before the piece of paper goes into the inventary a pop up like " u just got this piece of paper".
Is that clear?
Thx in advance, cheers
Comments
So i created a GUI texture and called it PaperPopup and set the texture to none...after I found a script called paperpopup in javascript like this:
function Start() { Hide(); }
function Hide() { guiTexture.enabled = false; } function Show(paper : Paper) { if (!guiTexture.enabled) { var t = paper.popupTexture; var rect = Rect( -t.width/2, -t.height/2, t.width, t.height ); guiTexture.pixelInset = rect; guiTexture.texture = t; guiTexture.enabled = true; } } function OnMouseUp () { Hide(); }<<p>then I apply this script to the gui texture...
then I have this script named paper:
arpopupTexture : var popupTexture : Texture2D;private var paperPopup : PaperPopup;
function Start () {
paperPopup = FindObjectOfType(PaperPopup);
if (popupTexture == null) {
popupTexture = renderer.material.mainTexture;
}
}
function OnMouseDown () {
paperPopup.Show(this);
}
applied this to the item
now in the action list I do Object send message but seems I can't call this function...advice?
Please don't expect others to write your code!
Chris already politely pointed you in the right direction ...
I just asked kindly if someone good at scripting can fix the script since I'm not able to....I don't think ur answer was very nice...I think it was a very stupid answer
Example Diary Pages:
I created a new menu voice called DiaryPage1 with this parameter:
Start game locked off UNCHECKED
Appear Tipe MANUAL
Pause game when enabled CHECKED
After that I created 2 elements in the menu. The first one called Page, the second one called Resume.
The first element parameters are like this:
Name: Page
Visible: Checked
Button Text: Empty
Click Type: custom script (just to leave it blank)
Font etc etc: doesn't matter since we don't have text
Higlight texture: empty
Sounds: ur choice
Background texture: finally THE DIARY PAGE
Position: Aligned
Size: Up to u
The second element parameters:
Name: Resume
Visible: Checked
Button Text: Resume
Click Type: TURN OFF MENU
Font etc etc: up to u
Higlight texture: empty
Sounds: ur choice
Background texture: none
Position: Aligned
Size: Automatic
Now we have this piece of paper on the ground with a hotspot on it...and now is easy. Call trought the hotstpot the interaction u need then inside the interaction use:
actions: Menu Change State
Change Type: Turn On Menu (DiaryPageA)
Fade: Up to u
After running: continue
this is basically how it works...when the character does the interaction u'll have a popup with the piece of paper and button resume near it to unpause the game...u can use multiple buttons to go trough a series of pages for example...just play around with the settings and u'll find out the best solution for ur needs.
Thx again 2finger for the basic idea
P.S. For ChrisIceBox: u think this trick is very memory consuming for mobile etc etc or is good?
w8in replies cyas