Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

If I put 100 IntValues into my character from a script, will the game lag or crash?

Asked by
Yeevivor4 155
9 years ago

If I put 100 IntValues into my character from a script, will the game lag or crash?

0
Lag. EzraNehemiah_TF2 3552 — 9y
0
Is there another way to put IntValues into a character that won't cause lag? Yeevivor4 155 — 9y
0
You can prevent this by not putting IntValues into the character. NotsoPenguin 705 — 9y
0
You could save the intvalues in the script. EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

No, this won't lag / crash. It will take a short time (maybe 60 milliseconds?) when you create them.

But objects that you can't see pretty much cost nothing to just lie around.


Changing objects takes time. Creating objects takes a bit more time. Destroying objects takes time, too. Reading from objects takes a little time.

By "a little time" I mean a millisecond or so. By "a bit more" I mean a few milliseconds.

That means it's okay as long as you don't do it constantly.


This is only true if the number of things made stops at a reasonable count (say, before 500).

That said, there's probably not a good reason to keep that many objects (you shouldn't have names for all of them, for sure).


Consider using simple tables to keep track of data instead.

Ad

Answer this question