Page 2 of 2

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 10:44 am
by CremionisD
Not sure if I should post a bug here, but I couldn't see any better place either..

Short: Differences in operation between Editor preview and Game: Script triggered from a pressure-plate won't run IN THE GAME if the party starting position is on the pressure plate. IMPORTANT: It works correctly in the editor (the script runs)!

I used a hidden pressure plate, "activate once" is checked. In the editor all is working as expected, however in the game itself it appears that the script didn't run: The script spawns some items (scrolls in alcoves etc..), which are missing from the dungeon. The other actions run just fine: The pressure plate closes the door in-front of the party just as I wanted it to.

There is a simple enough work-around: Trigger the script from another pressure-plate, which requires player to move over it instead of starting on it.

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 12:16 pm
by Lilltiger
cromcrom: You can also just call the script from it self and it will be executed when the game starts, like:

Code: Select all

doThis()

function doThis()
   hudPrint("Doing this!")
end
But I do agree that the game should function exactly as the editors preview, so they should fix that.

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 2:01 pm
by Komag
you can also have that opening script close that door instead of the hidden plate, just to build your dungeon cleaner if you want to

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 6:22 pm
by CremionisD
Lilltiger wrote:cromcrom: You can also just call the script from it self and it will be executed when the game starts
Thanks for the tip!

Although it seems that the call to the function needs to after the function is defined:

Code: Select all

function doThis()
   hudPrintf("Done")
end

doThis()

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 9:27 pm
by CremionisD
BUG in the "text" property-editor. I already talked about this in an earlier post, but now I know what causes it.

SHORT: When a backslash ("\") char is typed into the text-editor, it is no longer possible to select any entity from the dungeon map view.

Steps:
- Create any entity which has a "text" property in the Inspector.
- Type some text and type in a backslash.
- The bug is now active -- It is no longer possible to select any entity from the map-view: The items do highlight as they should, but when clicked the Inspector view doesn't update; However, the note or scroll entity that is selected is possible to be deselected (The Inspector becomes empty). Doing this doesn't recover from the problem.

- To recover from the issue, activate any other window and return to the editor. (I have not found any other way)

Just in case someone wonders, why I would write backslashes there: It's for newlines ("\n") ...

Re: Beta-1.2.9 now available!

Posted: Sat Sep 22, 2012 9:30 pm
by cromcrom
Nice, indeed.

Re: Beta-1.2.9 now available!

Posted: Sun Sep 23, 2012 8:39 am
by petri
Thank you for the bug reports!

Re: Beta-1.2.9 now available!

Posted: Sun Sep 23, 2012 7:15 pm
by SpacialKatana
petri wrote:Thank you for the bug reports!
Not sure if it's a bug but last night I couldn't get a counter to decrement from a script_entity.

The counter was called fate_counter and the line of code in another script was:-

fate_counter:decrement()

Seems however many times I triggered the script, the counter activation didn't occur...and yes it was attached to an altar(to spawn an object) with a setting of 3.

I prolly did something wrong tho, becuase I is a bit simples :(

Re: Beta-1.2.9 now available!

Posted: Mon Sep 24, 2012 7:03 am
by ScroLL
SpacialKatana wrote:
petri wrote:Thank you for the bug reports!
Not sure if it's a bug but last night I couldn't get a counter to decrement from a script_entity.

The counter was called fate_counter and the line of code in another script was:-

fate_counter:decrement()

Seems however many times I triggered the script, the counter activation didn't occur...and yes it was attached to an altar(to spawn an object) with a setting of 3.

I prolly did something wrong tho, becuase I is a bit simples :(
Your problem may have been that you need to put it in a function or it will only execute immediately at the beginning of the game. For example:

Code: Select all

function decrementFateCounter()

     fate_counter:decrement()

end

Re: Beta-1.2.9 now available!

Posted: Mon Sep 24, 2012 5:57 pm
by SpacialKatana
Your problem may have been that you need to put it in a function or it will only execute immediately at the beginning of the game. For example:
It was in a function, called from a monster dieing hook.....

function frostdone()
frostboss_light:activate()
for x = 1,4 do
local lcd = findEntity("frostboss_light"..x)
lcd:deactivate()
end
spawner_13:activate()
frostboss_door2:open()
frosty_timer1:deactivate()
fate_counter:decrement()
blue_ceiling_light_1:deactivate()
frostboss_altar:addItem(spawn("scroll_frostbolt"))
hudPrint("You have changed your fate...")
script_entity_1.exp1()
end

Hence why I think theres a bug...everything else triggered fine from this script.