Forum

> > CS2D > Maps/Editor > Trigger_If shut down CS2D
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Trigger_If shut down CS2D

8 replies
To the start Previous 1 Next To the start

old Trigger_If shut down CS2D

-DIE Wolf-
User Off Offline

Quote
Hj! Today i have little problem about trigger_if.
In map editor, When i paste my LUA script to Triiger_if. -If LUA too big, about 4~5 lines (with lines breaked), CS2D start lag and it auto shut down!
Help me fix that problem! Thank u

old Re: Trigger_If shut down CS2D

mozilla1
User Off Offline

Quote
Because a small text box can't handle too many data.

I've tried this in console, and my CS2D crashed.

Don't ever try to paste anything big to these text boxes.

old Re: Trigger_If shut down CS2D

VADemon
User Off Offline

Quote
rookgard1 has written
Don't ever try to paste anything big to these text boxes.


rookgard1 has written
Didn't mention a size limit. I only said it may crash.


So you said it may crash if there's something big/long. I want to find out the exact reason for crash.

old Re: Trigger_If shut down CS2D

MikuAuahDark
User Off Offline

Quote
Checkthis: file cs2d Automated Shop
user Apache uwu has written
How to >

if stillnotwork, your PC is too slow to do that

old Re: Trigger_If shut down CS2D

Apache uwu
User Off Offline

Quote
I can still pump out a decent 30 frames per second when I paste the monstrous 70 lines into cs2d.

If you're finding that pasting lua and quickly pressing [OK] is impossible, you can always manually edit the file and paste the lua there.

IMG:https://puu.sh/1Hgjg

old Re: Trigger_If shut down CS2D

DC
Admin Off Offline

Quote
Trigger_If is intended for one line Lua codes only. You should consider to use a map Lua file (this is a Lua file which is in the maps folder and has the name <NAME OF MAP>.lua - it will be automatically loaded with the map). Create a Lua function in it which does what you want to do in your Trigger_If and put the name of this function in your Trigger_If. Everything else is quite dirty and bad practice.
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview