Jump to content

Scripting Help


Masiaf
 Share

Recommended Posts

So I create my very own first map, Horrah!. No crashes or screw ups, except for the conditions for failure.

 

This is the the whole thing, nothing to brag about:

 

TRUE ? SetTutorialFlags 0

TRUE ? SetMessagePermit 1

 

TRUE ? SetR1 0

GetMiniFiguresOnLevel < 3 ? GetR1

GetOxygenLevel < 1 ? GetR1

GetR1 = ? SetGameFail

 

GetCrystalCurrentlyStored > 25 ? SetLevelComplete

 

I go in, test the level by teleporting out 3 of the 5 preset Rock Raiders, and nothing happens. I followed the scripting tutorial with the NPL scripter on how to make a failure or completetion.

 

I want it to make have you limit the number of Rock Raiders being teleported out for a failure. What is it that I missed?

Link to comment
Share on other sites

I go in, test the level by teleporting out 3 of the 5 preset Rock Raiders, and nothing happens. I followed the scripting tutorial with the NPL scripter on how to make a failure or completetion.

I want it to make have you limit the number of Rock Raiders being teleported out for a failure. What is it that I missed?

Because your script doesn't actually do anything.

TRUE ? SetR1 0

GetMiniFiguresOnLevel < 3 ? GetR1

GetOxygenLevel < 1 ? GetR1

GetR1 = ? SetGameFail

Look at this section, and let me describe in basic English what you've done.

If True, set the variable R1 to 0

Get the number of minifigures on the level. If it's less than 3, then get the value of R1.

Get the amount of oxygen on the level. If it's less than 1, then get the value of R1.

GET THE VALUE OF R1 EQUAL TO UNKNOWN, SET THE GAME FAILED.

The end of line 2 and 3 both make no sense. You should be adding a new value to R1, not trying to find the value of it, because that does nothing.

The worst part is the last line which makes no sense. First, you get the value of R1, but you don't compare it to any value. Because there's no value, the game cannot fail.

Fix these problems up, and it should work fine.

Link to comment
Share on other sites

Do appreciate your lecture, I didn't pay attention to the AddR1 in the variable section. I just have to reword the scripting, when I review over it.

It's a start though.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.