Data Realms Fan Forums
http://45.55.195.193/

Lua script crashes game?
http://45.55.195.193/viewtopic.php?f=73&t=25571
Page 1 of 1

Author:  Awesomeness [ Mon Sep 19, 2011 2:32 am ]
Post subject:  Lua script crashes game?

So, I'm modifying the AI Lua so my actor has a little bar over his head. This is the beginning of the script: (The rest isn't any different)



The bar floats over his head just fine. However... After a few seconds the game crashes without error. What's wrong?

Author:  CaveCricket48 [ Mon Sep 19, 2011 2:47 am ]
Post subject:  Re: Lua script crashes game?

You should check if the bar exists before setting its position.

Author:  TheLastBanana [ Mon Sep 19, 2011 3:01 am ]
Post subject:  Re: Lua script crashes game?

MOSParticles will automatically delete themselves after not moving for a while, even if they have a long lifetime. To work around this, you can set the MOSParticle's Age to 0 and ToDelete to false every update.

Author:  Awesomeness [ Mon Sep 19, 2011 3:17 am ]
Post subject:  Re: Lua script crashes game?

Worked perfect. Thanks.

Author:  Awesomeness [ Mon Sep 19, 2011 4:11 am ]
Post subject:  Re: Lua script crashes game?

Um... The bar that floats above my head settles when I move it through the ground 1/8 of the time D:

This is the start of the lua:


And this is the ini for the bar:



I can't understand what's wrong :oops:

Author:  Asklar [ Mon Sep 19, 2011 6:08 am ]
Post subject:  Re: Lua script crashes game?

And if you use a MOSRotating instead of a MOSParticle?

I did the bar thingie for a charging weapon, and I used a MOSRotating and I haven't got any problems at all.

Author:  CaveCricket48 [ Mon Sep 19, 2011 11:36 am ]
Post subject:  Re: Lua script crashes game?

Make it pinned and ToSettle = false.

Author:  Awesomeness [ Mon Sep 19, 2011 12:12 pm ]
Post subject:  Re: Lua script crashes game?

Setting the PinStrength worked perfectly. Thanks a bunch :P

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/