Scripts / New to GG & LUA, need help with Triggers in relation to text displayed on screen.

Author
Message
LordinSiidius
8
Years of Service
User Offline
Joined: 14th Nov 2016
Location:
Posted: 15th Nov 2016 15:46
I realize what I am about to say will sound really newbish, and I am aware that this is likely a very simple matter of which I am just not executing correctly, but I require some help to understand, further my learning of the platform and the scripting, and ultimately complete my own project.

I can make trigger zones show text with the built in textinzone script, though I have been unsuccessful using my own or other's codes that should also create this effect. While using the textinzone is fine, I know I will need to write my own or use other code in the future, so I'd like to understand more on this, however my main issue currently is with the textinzone. Unlike say Disney Infinity, where a trigger can produce a result, and the result can kill the trigger to prevent future use, I cannot find a means to do this in GG. The outcome is that whenever a player walks through the zone, the text repeats every time, and I want the text to end after a specific condition is met, whether that be get a key or just display the text once for information and then not again (currently my main goal), or rotate the text from multiple different text lines (for example: make a npc say 3 different phrases on cycle, once the third phrase is said it repeats from the first for as often as the player walks into the zone).

So, I need someone who can help me figure out the appropriate code and how to execute it within GG (I am aware some things require workarounds, like placing a second obj, making it run another script like variables from the start of the level, and recalling that information from the object in use though I am not sure to what areas those needs for a workaround are best suited. I feel like this should be able to be handled from the same script in the zone, but I am aware that it may not be that simple in GG.) that will either count the amount of times the text has executed and then stop it, kill the triggerzone, or grant me an option to say x the first time and say y, z the second and third times. Any of these would lead to the same overall usages and lessons that I am in need of.

I'd welcome any help I can get, as it is my goal to learn to build GG, LUA, C++, and AGK.

Thanks, LS
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Nov 2016 20:13
If I get your point right Destroy(e), is the command you are looking for.
It destroy the trigger, after the task is done.
hth

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
LordinSiidius
8
Years of Service
User Offline
Joined: 14th Nov 2016
Location:
Posted: 19th Nov 2016 22:43
It's a bit more involved than that. I have tried to execute that order, and failed. My usage matches the examples I have seen, written, copied, or altered. I'm looking for something proven, with instruction on how to use it, so I can identify what I am doing wrong.

Thanks,

LS
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Nov 2016 00:59
Exactly as 3com said, you put Destroy(e) in the _main part of the script and it destroys the trigger zone, there's nothing else to it.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Nov 2016 00:59 Edited at: 20th Nov 2016 01:00
Oops double post, not sure how that happened.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
LordinSiidius
8
Years of Service
User Offline
Joined: 14th Nov 2016
Location:
Posted: 20th Nov 2016 01:58
Is it known to glitch or does it need an end styled function? I have done that but the triggers don't stop working as indicated.
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Nov 2016 02:10
Not that I know of, I can't post an example at the moment as i only have my phone with me right now, but when I get home I'll check and post an example script for you if nobody else has.

Can you post the script you're trying to use so we can trouble shoot it for you?

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
LordinSiidius
8
Years of Service
User Offline
Joined: 14th Nov 2016
Location:
Posted: 21st Nov 2016 19:41 Edited at: 21st Nov 2016 19:42
Yeah, as soon as Jason at TGCSTORE gets back with me and fixes my issue I can do that. An account issue is making my GG act funny, and half my store stuff is gone. It claims I have multiple store accounts, a glitch I think happened when signing in with Steam. As soon as I regain control of my GG account, I will get the specific snippet in question up for you to browse.
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 21st Nov 2016 22:22
OK no worries, sorry I haven't posted any script yet, I've not been at my main pc for a few days (on holiday), once you post your snippet i'll take a look and see if I can fix it.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.

Login to post a reply

Server time is: 2024-12-23 00:05:12
Your offset time is: 2024-12-23 00:05:12