Forum

> > CS2D > Scripts > Is it possible to change entities string with LUA?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Is it possible to change entities string with LUA?

12 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Is it possible to change entities string with LUA?

Apache uwu
User Off Offline

Zitieren
I'm pretty sure entity names and trigger strings are stored in the map. And during gameplay is probably read-only. Even if you could change it client side, a parse(trigger) command won't affect them because you can't change the entity names for them...

This was actually one of my suggestions.

> Dynamic Entities

     It would allow you to create any entity at will and change their parameters. That means you can insert a dynamic wall seamlessly.

alt Re: Is it possible to change entities string with LUA?

Vectarrio
User Off Offline

Zitieren
user Infinite Rain hat geschrieben
Something like
Func_Message

entity(x, y, 'str0') - string of the message possible to edit it?

I don't think so, but you could make:
1
2
3
4
5
6
7
addhook("trigger","lol")
function lol(name)
	if name=="yourtriggernamehere" then
		parse("trigger \"yourchangednamehere\"")
		return 1
	end
end
so, it doesn't triggers "yourtriggernamehere", but triggers "yourchangednamehere" instead

alt Re: Is it possible to change entities string with LUA?

Apache uwu
User Off Offline

Zitieren
Yeah it's a function. Unless you change the function. Will be useless anyways.

COMPLETELY USELESS JUST PROOF OF CONCEPT
1
2
3
4
5
6
7
8
9
10
11
_entity=entity
function entity(x,y,value)
	if x=="1" and y=="1" then
		if value=="str0" then
			return "mystr"
		end
	end
return _entity(x,y,value)
end

--entity(1,1,"str0") = mystr
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht