Internal commands

Started by Hilbert, July 28, 2012, 01:23:29 PM

Previous topic - Next topic

Dav999

Quote from: crazyal02 on October 14, 2012, 03:11:34 PM
Quote from: Protoman on October 14, 2012, 01:23:04 AM
ATTENTION
DO NOT USE THIS COMMAND:

create(derp,701)

IT WILL BLOW UP THE LEVEL

























  • me needs to be serious
  • this no be real

http://www.youtube.com/watch?v=Wd7KcCk5Ct0


I kind of wish it actually worked.

Why do you put a space between say and the number? Ah well.

N

Quote from: crazyal02 on October 14, 2012, 03:11:34 PM
Quote from: Protoman on October 14, 2012, 01:23:04 AM
ATTENTION
DO NOT USE THIS COMMAND:

create(derp,701)

IT WILL BLOW UP THE LEVEL

























  • me needs to be serious
  • this no be real

http://www.youtube.com/watch?v=Wd7KcCk5Ct0


I kind of wish it actually worked.

Liked and favorited!

N

AND I TOLD YOU NOT TO USE IT

Dav999

Quote from: Protoman on October 14, 2012, 04:22:14 PM
AND I TOLD YOU NOT TO USE IT

That only makes us more curious :D

But I already knew nothing was going to happen. 8)

allison

Quote from: Dav999 on October 14, 2012, 07:13:52 PM
Quote from: Protoman on October 14, 2012, 04:22:14 PM
AND I TOLD YOU NOT TO USE IT

That only makes us more curious :D

But I already knew nothing was going to happen. 8)

I figured that internal commands were so bizarre and unstable that something might actually happen :P

RibShark

Quote from: blue626 on October 13, 2012, 08:20:40 PM
I've been testing internal scripting in a differnt way, to see if it worked:

say(-x)
internal x times

I found a glitch, I'll tell details later.

You have piqued my interest... How far away is later?

avengah

It only detects one internal command, but you see an empty text box as well.

FIQ

#307
I'm trying to find a way to get rid of the cutscenebars while doing internal stuff.

So far I've only managed to get 1 line of internal script to execute *before* the cutscenebars, but not managed to get rid of them. Progress! I hope...

EDIT: Managed to get rid of cutscenebars and force 1 line of script to appear. As a bonus, I didn't have to force stop the script by loadscript(stop) (How did that happen?)

Script: test
A)Say
alarmon

Will trigger the alarm. No terminal sound. No cutscenebars. No dialog rubbish after the script. Let's see if I can get this to work with more than 1 line...

EDIT2: Any value will do, not just -1. Still don't know if you can expand on it though.

EDIT3: Putting this *anywhere* in a script containing simplified scripting without say/reply scripts will make the internal script go first. Always. Even if you placed it last. Also, inserting ANY kind of "normal" say/reply commands after the above will make the internal script ignored completly. If you put it before, the internal script will still go first, but cutscenebars will also appear as normal (but also work normally in general, i.e. turning off as expected when the script is done etc)

EDIT4: You can work-around only being able to use 1 internal script this way by utilizing external scripts and call them with iftrinkets(0,script). However, this will make you limited to 1 internal script line per script. So if you want to do something with 20 lines... well, you get the idea. Still, short segments of internal code in an otherwise big script that doesn't want cutscenebars can benefit from it. And cutscenebars is a *good* thing in dialogs and generally in bigger scripts.

This works in both 2.0 and 2.1 It's basically a new way to trick the parser -- if the "traditional" method would be fixed, even though I can't see it be done, this will still work and vice versa. At least that's what I think. This can be used in custom levels to experiment with new ideas -- internal entities come to mind.

Dav999


FIQ

#309
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Dav999

Quote from: FIQ on October 15, 2012, 05:25:43 PM
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Did you put anything in the zip? It's empty ???

EDIT: It started with a dot, so it showed up as hidden for me. :P Will try it out.

By the way, I'm also testing it with specialline(x) now.

FIQ

#311
Quote from: Dav999 on October 15, 2012, 05:33:31 PM
Quote from: FIQ on October 15, 2012, 05:25:43 PM
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Did you put anything in the zip? It's empty ???

EDIT: It started with a dot, so it showed up as hidden for me. :P Will try it out.

By the way, I'm also testing it with specialline(x) now.
I also found out this: Sometimes (often) if you have something below that ^, the script will just not execute at all. Don't know why exactly, but since it doesn't matter, you can place it last in a script, it will go first anyway :P

If even that environment doesn't work (for you), I have no idea really. Linux exclusive glitch ???

Dav999

Quote from: FIQ on October 15, 2012, 05:36:49 PM
Quote from: Dav999 on October 15, 2012, 05:33:31 PM
Quote from: FIQ on October 15, 2012, 05:25:43 PM
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Did you put anything in the zip? It's empty ???

EDIT: It started with a dot, so it showed up as hidden for me. :P Will try it out.

By the way, I'm also testing it with specialline(x) now.
I also found out this: Sometimes (often) if you have something below that ^, the script will just not execute at all. Don't know why exactly, but since it doesn't matter, you can place it last in a script, it will go first anyway :P

If even that environment doesn't work (for you), I have no idea really. Linux exclusive glitch ???

That level worked, and I found out how to make it work (although I have no idea why it works :P)

A)Say
alarmon

This doesn't work.

delay(0)
A)Say
alarmon

This does work!

So, a delay makes it work. I've also tried
#
A)Say
alarmon

but that didn't work. Now I tried it again and it did work??? ???

Anyway: putting a delay(0) or # in front of it makes it work. (And of course ifflagging from another script)

It's also handy for gotoroom!

FIQ

#313
Quote from: Dav999 on October 15, 2012, 05:46:40 PM
Quote from: FIQ on October 15, 2012, 05:36:49 PM
Quote from: Dav999 on October 15, 2012, 05:33:31 PM
Quote from: FIQ on October 15, 2012, 05:25:43 PM
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Did you put anything in the zip? It's empty ???

EDIT: It started with a dot, so it showed up as hidden for me. :P Will try it out.

By the way, I'm also testing it with specialline(x) now.
I also found out this: Sometimes (often) if you have something below that ^, the script will just not execute at all. Don't know why exactly, but since it doesn't matter, you can place it last in a script, it will go first anyway :P

If even that environment doesn't work (for you), I have no idea really. Linux exclusive glitch ???

That level worked, and I found out how to make it work (although I have no idea why it works :P)

A)Say
alarmon

This doesn't work.

delay(0)
A)Say
alarmon

This does work!

So, a delay makes it work. I've also tried
#
A)Say
alarmon

but that didn't work. Now I tried it again and it did work??? ???

Anyway: putting a delay(0) or # in front of it makes it work. (And of course ifflagging from another script)

It's also handy for gotoroom!
Ohh, so you don't *have* to run it externally, just run something before? Good to know!

Wonder how quickly scripts do run? Was thinking of doing a trinket room in my level, like in the original game. :3

Dav999

Quote from: FIQ on October 15, 2012, 05:48:39 PM
Quote from: Dav999 on October 15, 2012, 05:46:40 PM
Quote from: FIQ on October 15, 2012, 05:36:49 PM
Quote from: Dav999 on October 15, 2012, 05:33:31 PM
Quote from: FIQ on October 15, 2012, 05:25:43 PM
Quote from: Dav999 on October 15, 2012, 05:23:28 PM
Quote from: FIQ on October 15, 2012, 04:57:16 PM
Script: test
A)Say
alarmon

It doesn't work :-\
Hmm. Weird, it does for me!
I'll check for typos/etc, brb

EDIT: ...lol
I found out why. (I played around with my dedicated test level and didn't realize that I actually loaded another script)

Try this instead:

Script: test
flag(90,on)
ifflag(90,test2)

Script: test2
A)Say
alarmon

If it still doesn't work, try the level below to see my exact environment. Might explain why then.

Did you put anything in the zip? It's empty ???

EDIT: It started with a dot, so it showed up as hidden for me. :P Will try it out.

By the way, I'm also testing it with specialline(x) now.
I also found out this: Sometimes (often) if you have something below that ^, the script will just not execute at all. Don't know why exactly, but since it doesn't matter, you can place it last in a script, it will go first anyway :P

If even that environment doesn't work (for you), I have no idea really. Linux exclusive glitch ???

That level worked, and I found out how to make it work (although I have no idea why it works :P)

A)Say
alarmon

This doesn't work.

delay(0)
A)Say
alarmon

This does work!

So, a delay makes it work. I've also tried
#
A)Say
alarmon

but that didn't work. Now I tried it again and it did work??? ???

Anyway: putting a delay(0) or # in front of it makes it work. (And of course ifflagging from another script)

It's also handy for gotoroom!
Ohh, so you don't *have* to run it externally, just run something before? Good to know!

Wonder how quickly scripts do run? Was thinking of doing a trinket room in my level, like in the original game. :3

Well, I think it runs quick enough to do that. If you make :viridian: walk into another room with walk(x,x), and if you time it correctly, you can create an entity fast enough to make it look like it was there before you entered the room.