Author Topic: Internal commands  (Read 257634 times)

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #300 on: October 14, 2012, 08:20:18 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

  • Captain
  • *****
  • Posts: 870
  • AKA Arvis/Dank Meme Machine™
    • View Profile
Re: Internal commands
« Reply #301 on: October 14, 2012, 09:21:05 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

  • Captain
  • *****
  • Posts: 870
  • AKA Arvis/Dank Meme Machine™
    • View Profile
Re: Internal commands
« Reply #302 on: October 14, 2012, 09:22:14 AM »
AND I TOLD YOU NOT TO USE IT

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #303 on: October 14, 2012, 12:13:52 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

  • Captain
  • *****
  • Posts: 924
  • monolithic since 2012??
    • View Profile
    • Allison Fleischer
Re: Internal commands
« Reply #304 on: October 14, 2012, 04:15:51 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

  • Crewmate
  • **
  • Posts: 23
    • View Profile
Re: Internal commands
« Reply #305 on: October 15, 2012, 08:26:39 AM »
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

  • Professor
  • ****
  • Posts: 117
    • View Profile
Re: Internal commands
« Reply #306 on: October 15, 2012, 08:53:49 AM »
It only detects one internal command, but you see an empty text box as well.

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #307 on: October 15, 2012, 09:57:16 AM »
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.
« Last Edit: October 15, 2012, 10:24:58 AM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #308 on: October 15, 2012, 10:23:28 AM »
Script: test
A)Say
alarmon

It doesn't work :-\

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #309 on: October 15, 2012, 10:25:43 AM »
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.
« Last Edit: October 15, 2012, 10:32:07 AM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #310 on: October 15, 2012, 10:33:31 AM »
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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #311 on: October 15, 2012, 10:36:49 AM »
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 ???
« Last Edit: October 15, 2012, 10:38:47 AM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #312 on: October 15, 2012, 10:46:40 AM »
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)

Code: [Select]
A)Say
alarmon
This doesn't work.

Code: [Select]
delay(0)
A)Say
alarmon
This does work!

So, a delay makes it work. I've also tried
Code: [Select]
#
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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #313 on: October 15, 2012, 10:48:39 AM »
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)

Code: [Select]
A)Say
alarmon
This doesn't work.

Code: [Select]
delay(0)
A)Say
alarmon
This does work!

So, a delay makes it work. I've also tried
Code: [Select]
#
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
« Last Edit: October 15, 2012, 10:52:05 AM by FIQ »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2173
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #314 on: October 15, 2012, 11:00:35 AM »
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)

Code: [Select]
A)Say
alarmon
This doesn't work.

Code: [Select]
delay(0)
A)Say
alarmon
This does work!

So, a delay makes it work. I've also tried
Code: [Select]
#
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.