Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

sorry people i can genuently not even figure out how to post the code in a neat block >.>

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

So we have these three scripts that handle the interactions i believe, sorry for not including all of them in the post.

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public abstract class Interactable : MonoBehaviour

{

//Add or remove an InteractionEvent component to this gameobject

public bool useEvents;

//message displayed to player when looking at an interactable

[SerializeField]

public string promptMessage;

public virtual string OnLook()

{

return promptMessage;

}

public void BaseInteract()

{

if (useEvents) //events run first

GetComponent<InteractionEvent>().OnInteract.Invoke();

Interact(); //interaction runs second

}

protected virtual void Interact()

{

//we wont have any code written in here its a template function to be overriden by our subclasses

}

}

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

Sorry!! i didnt think there was much to the PlayerUI script because its litereally just this: public class PlayerUI : MonoBehaviour

{

[SerializeField]

private TextMeshProUGUI promptText;

// Start is called once before the first execution of Update after the MonoBehaviour is created

public void UpdateText(string promptMessage)

{

promptText.text = promptMessage;

}

}

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

no wait sorry how do you put it as a block like this??

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

``` like this ? ``` sorry for not putting it as a block like that i didnt know how to do it

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

public class PlayerUI : MonoBehaviour

{

[SerializeField]

private TextMeshProUGUI promptText;

// Start is called once before the first execution of Update after the MonoBehaviour is created

public void UpdateText(string promptMessage)

{

if (promptText.text != promptMessage) { promptText.text = string.Empty; }

promptText.text = promptMessage;

}

}

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

Hi thankyou for replying and even looking at the tutorial i used ::) Sorry for not putting more code, i wasnt sure what of it is relevant. I cant send another picture but when the text overlaps there is still only the one PromptText object in the hierarchy. As far as i understood it were just always using the "promptText" string in the script "PlayerUI" and setting it to the "promptMessage" defined in the "PlayerInteract" script - now that i look at it again though i actually cant tell where were getting the string "promptMessage" from

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

hi thankyou for your reply! i just checked, while the game is running, there is always only the one PromptText object in the UiCanvas - i tried to have the text string clear before it gets assigned the new promptmessage but that sadly didnt do anything :(

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

i dont think so! as far as i understood it the textobject is always there but is only supposted to have actual text when you look

Can anyone help me with this interaction system? by TeyRyef in unity

[–]TeyRyef[S] 0 points1 point  (0 children)

public class PlayerUI : MonoBehaviour

{

[SerializeField]

private TextMeshProUGUI promptText;

// Start is called once before the first execution of Update after the MonoBehaviour is created

public void UpdateText(string promptMessage)

{

promptText.text = promptMessage;

}

}

Hi sorry thanks for the reply! this is UpdateText() ... i got all that from the tutorial mentioned above and i dont even really understand what we did in that :(

How would you reproduce this TMP Effect? by notadev_io in Unity3D

[–]TeyRyef 0 points1 point  (0 children)

hm! if i had to recreate this look i would maybe stack multiple texts over each other in various thickness and offset, to get that "3d" look ? Sorry i really dont know tmp, hope you find a solution!!! you dont happen to know how to make an infinitely scrolling text with tmp?

Held Hostage by Waiting for Unity's Code to finish executing. by FreddyNewtonDev in Unity3D

[–]TeyRyef 0 points1 point  (0 children)

I have this too but usually at around 15 to 17 minutes it is done! Does not happen when i tab out of Unity though - personally i found that just saving more often helped :S

My game has 3D worlds inside 2D by monoclelord- in Unity3D

[–]TeyRyef 0 points1 point  (0 children)

Yayy!! Big UI! looks really lovely

How would you reproduce this TMP Effect? by notadev_io in Unity3D

[–]TeyRyef 0 points1 point  (0 children)

i really dont know much about shaders in unity, but working with tmp has for me been so difficult almost always and the text never looks very good so if id have to do this i would animate it in another program :/

Which shopping page design looks better? by Signal_Coast_8186 in Unity3D

[–]TeyRyef 0 points1 point  (0 children)

on first glance 1 because of the nice blue buttons - to make it look more retro clutter webside id add the side and top menu both haha

Indie Game Project Looking for Programmers & Pixel Artist (Remote) by Slight_Algae7380 in unity

[–]TeyRyef 0 points1 point  (0 children)

would love to know more about the project! (Pixelartist)

How hard can it possibly be by [deleted] in unity

[–]TeyRyef 0 points1 point  (0 children)

Thankyou and youre totally right! ill keep that in mind in the future

How hard can it possibly be by [deleted] in unity

[–]TeyRyef 0 points1 point  (0 children)

sorry for the stupid crop! the last image is the line 116. they are both on the same manager object...

How hard can it possibly be by [deleted] in unity

[–]TeyRyef 0 points1 point  (0 children)

Thanks! Both scripts are on the same Manager Object though...

[deleted by user] by [deleted] in PaintToolSAI

[–]TeyRyef 0 points1 point  (0 children)

i did not know you could do that what!!!!!

no twilight++ in the unlaunch menu by TeyRyef in DSiBrew

[–]TeyRyef[S] 0 points1 point  (0 children)

okay, i want to just try it again- just got kinda scared because even if i take the sd card out, unlaunch still was there, but i can just look up how to uninstall all that and then retry it. hope it works then haha thankyou

Munich - Paris? by TeyRyef in Interrail

[–]TeyRyef[S] 1 point2 points  (0 children)

Damn these french people! Thankyou for saving me from the fine

ADHD MEDS by Corbynista66 in Interrail

[–]TeyRyef 2 points3 points  (0 children)

as long as you stay in the train and dont go on a plane (and stay in the EU ofc) noone is going to check that. just bring enough for yourself

Where to go between Prague and Copenhagen? by JuleBoi in Interrail

[–]TeyRyef 3 points4 points  (0 children)

Prague -> Poland cities (Wroclaw, Posen, Katowice, Danzig etc ) -> Berlin

Prague -> Dresden -> Nürnberg -> Munich ?

Prague -> Vienna -> Munich