Works like a charm, thanks. Now I need to figure out why the "level" text continues to show "lev" onscreen. It might be because the xp bar is rendering even though it's transparent. Now that I think about it that's probably the problem and I'll take a look after work.
No, transparent doesn't overwrite. That would be absurd.
You need to make sure that both the source rect and the cliprect are appropriate. I can't imagine him using a cliprect other than the fullscreen rect, but you never know.
Clip rect is the last argument "pushed" when calling.
Is there a way to have an event occur only when inside one block?
I'm trying to use TSC to make a 'realistic' sign, where you can only read it when you're in the same block as the sign sprite. I tried this with quite a few H/V Triggers using the Option 1 and 2 flags (sorry for being super correct terms guy) and something like this-
Code:
#0100
<FLJ0040:0101<FL+0040<MS3This is a sign!<WAI9999<CLO<END
#0101
<CLO<END
The arrangement was something like this-
[font=courier new, courier, monospace]XXXXX[/font]
[font=courier new, courier, monospace]X X[/font]
[font=courier new, courier, monospace]X Y X[/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]Where X is event 101 and Y is event 100. (My hopes were that touching the surrounding blocks would close the box)[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]I then noticed that since I had the 9999 tick wait, it wouldn't run any events during that time, I changed it to this-[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]
Code:
#0100
<FLJ0040:0101<FL+0040<MS3This is a sign!<END
#0101
<CLO<END
[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]But the <END would close the script, so I took out the <END and switched the events around (because if I didn't, the message would have #0101, too) (and yes, I switched the entity events as well).[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]Then the game decided to freak out when I ran it (just like falling out of a map will eventually land you in 'water') and play random events, so I basically deleted the EXE and quit trying.
[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]Basically, I would like to know if there's a way I can accomplish this.[/font][/font]
[font=courier new, courier, monospace][font=arial, helvetica, sans-serif]Thank you in advance!
You need an <END at the end of every script. By deleting it and then putting event #0100 after #0101 the game started looking in other scripts for the event and got extremely buggy. Also events need to be in order.
The script you need should look like this:[/size]
Code:
#0100
<FLJ0040:0101<FL+0040<MS3This is a sign!<NOD<END
#0101
<CLO<END
<NOD makes it so that it waits for the player input before continuing the script.
You need an <END at the end of every script. By deleting it and then putting event #0100 after #0101 the game started looking in other scripts for the event and got extremely buggy. Also events need to be in order.
The script you need should look like this:[/size]
Code:
#0100
<FLJ0040:0101<FL+0040<MS3This is a sign!<NOD<END
#0101
<CLO<END
<NOD makes it so that it waits for the player input before continuing the script.
I knew all of these things, I guess I was just being stupid.
I guess I need to rephrase everything, which I will refrain from doing since I probably have no idea what I'm doing.
I guess this is what I mean (PICTURE COMPLETELY MOCKED UP)-
Top-
In same tile as sign entity, message event occuring.
Bottom-
Not in same tile as sign entity, message closed and event not occurring.
Sorry about all of my stupid mistakes and the confusion.
No, I simply mocked up the photo. Sorry for all of the confusion, I'll figure it out.
I cannot explain this enough, and I'm making myself look incredibly stupid because what I'm trying to say is coming off as something completely different. I'm sorry! I can figure this out on my own.
There is absolutely no way that you can read a sign on a different block than the sign, unless you are really dumb and used an H/V trigger.
Just take a regular entity (a sign), give it flag 0x2000, set it to an event, and write whatever you want inside that event. Confused? Read some TSC tutorials. Either by Noxid or someone else.
Oh oh I think I get it
Do you mean you want to be able to move while reading the sign, and when you leave it disappears, or rather that when you are on the same tile as a sign it automatically turns on, and then have the previous happen?
Oh oh I think I get it
Do you mean you want to be able to move while reading the sign, and when you leave it disappears, or rather that when you are on the same tile as a sign it automatically turns on, and then have the previous happen?
Yes.
I was trying to figure out how to/ if it is possible to do this via TSC, but my initial attempts failed.
That is what I was ask.
I must reaaaaaaly suck at explaining things. Yeesh.
Unless you rewrite all of TSC, that is not possible.
Why? TSC must trigger due to an event happening. If you just hover over something, it must trigger the event. That works with 0x100 flag. You could do it that way. You would need to temporarily disable the 0x100 entity using a timer. Timers don't exist in TSC unless you use mutexes in C++. That means lots of assembly.
You'd have to assembly hack the exe so that the render call for the weapon's sprite is called before the render call for the player. I don't know exactly where these are, so have fun searching for them.