[Custom Dungeon Script Issue] Repeating Text on timer

Have trouble running Legend of Grimrock 2 or do you have questions about the purchasing options? Look for help here.
Post Reply
Chimeracorp
Posts: 11
Joined: Fri Jan 16, 2015 7:50 am

[Custom Dungeon Script Issue] Repeating Text on timer

Post by Chimeracorp »

Okay I have a small issue. The dungeon I am building has an issue.

I have a room set up to play out a makeshift cutscene with even played off a timer. However the issue seems to be that the timer isn't progressing, instead just ticking on '1' the whole time

Image
here's a small example of the script, the first function is set to a floor tile and the second is set when the timer activates
Image
and here is the result. Note: There is other text that is supposed to hit on the three second mark

One possible issue I can think is that there is another timer on this level already, under the name of timer_2. It does a similar objective, with a text based cutscene while trapped in a room.
Image
There is the script to end and deactivate timer_2. If this is the reason why that's happening, then is there any work around?

For further info
Image
this is the settings for the timer_rat itself.

Any help would be admired. I am willing to answer any additional questions for more info.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Custom Dungeon Script Issue] Repeating Text on timer

Post by minmay »

Are you incrementing timecount in your first script?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Chimeracorp
Posts: 11
Joined: Fri Jan 16, 2015 7:50 am

Re: [Custom Dungeon Script Issue] Repeating Text on timer

Post by Chimeracorp »

Image
Here's the script for the first timer (timer_2)
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Custom Dungeon Script Issue] Repeating Text on timer

Post by minmay »

You did not answer the question, and your screenshot contains no useful information whatsoever.

I assume you took the working script for timer_2 from someone else. "timecount" is a variable. A variable holds one value until something changes it. If you put "timecount = 1" in your script, timecount will continue to be 1 unless you change it to something else. In the timer_2 script, the function called by the timer ends with this line:

Code: Select all

timecount = timecount + 1
This line sets timecount to timecount+1. In other words, it increases the value of timecount by 1. Therefore, timecount in that script increases by 1 every time the function is called. It sounds like you put another variable named timecount in your own script, but you never changed it after initially setting it to 1.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Chimeracorp
Posts: 11
Joined: Fri Jan 16, 2015 7:50 am

Re: [Custom Dungeon Script Issue] Repeating Text on timer

Post by Chimeracorp »

Yeah I figured this out on the car ride home. Thank you though for your patience.
Post Reply