Transparent Characters

Micro

sonic heroes is a good game
I need help with an LUA that makes characters transparent.

I know it's possible because the Chaos mod from 2.1 did it.
 
It's Lua not LUA
Making "characters transparent"...

Are you talking about text or playable characters?
Given you're talking about Chaos mod, I am led to assume you mean text, but just in case...

If you're talking about characters in the context of text, you have to escape special characters.
Here's how, and this should give you some characters for you to try out.

If you mean as in making players slightly more transparent, you have to apply one of the translucency constants to the player object's frame variable.
(Something like player.mo.frame = $ | TR_TRANS40 for example)
 
Code:
if player and player.valid then
	if player.mo and player.mo.valid and player.mo.skin == "sonic"
	and not (player.powers[pw_carry] == CR_NIGHTSMODE) then
    player.mo.frame = $|TR_TRANS40
end)

Now all I need to do is find out how to fix the error.
 
You need to describe the error if you are looking for answers.

From the looks of it, your snippet is missing an end. Probably right after where you add the transparency flag.
 
lua/LUA_TRNS:5: unexpected symbol near ')'

What does that mean?

this always bugged me.
 
It means that there's an unexpected symbol near a closing parenthesis at line 5 of the script LUA_TRNS.

IF the snippet you posted is the entire script you have, then that would explain the error, since you added a parenthesis at the end there that doesn't do anything.
 
Code:
addHook("ThinkFrame", function()
	     for player in players.iterate do
           if player and player.valid then
	          if player.mo and player.mo.valid and player.mo.skin == "sonic"
	          and not (player.powers[pw_carry] == CR_NIGHTSMODE) then
    player.mo.frame = $|TR_TRANS40
end

LUA_DEAD:5: 'end' expected (to close 'if' at line 1) near '<eof>'
How do I fix this
 
Last edited:
Code:
addHook("ThinkFrame", function()
	     for player in players.iterate do
           if player and player.valid then
	          if player.mo and player.mo.valid and player.mo.skin == "srbii"
	          and not (player.powers[pw_carry] == CR_NIGHTSMODE) then
          player.mo.frame = $|TR_TRANS40
		end	
	end		
end)

is there a reason I'm still getting the same errors that i got before?
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top