Page 1 of 1

[Custom Dungeon Script Issue] Repeating Text on timer

Posted: Wed Jan 21, 2015 3:53 am
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.

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

Posted: Wed Jan 21, 2015 4:03 am
by minmay
Are you incrementing timecount in your first script?

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

Posted: Wed Jan 21, 2015 4:05 am
by Chimeracorp
Image
Here's the script for the first timer (timer_2)

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

Posted: Wed Jan 21, 2015 5:20 am
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.

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

Posted: Wed Jan 21, 2015 11:42 am
by Chimeracorp
Yeah I figured this out on the car ride home. Thank you though for your patience.