Jump to content

About NERPs and Scripts


RockRaiderWolf
 Share

Recommended Posts

RockRaiderWolf

So from what I have seen it is obviously possible to make a working script that does not use the NERPs.
What I want to know is this, previously the tutorials I had read gave me the impression that most of the Variables could not be used as the NERPs file already used them. So if a script is created that does not use the NERPs file is it possible to use all eight of the variables (R0-R7) without issues?

Link to comment
Share on other sites

McJobless

What.

 

NERPS = Scripting system?

 

And, problems with variables? The only thing I recall you couldn't freely use were two timers.

Link to comment
Share on other sites

RockRaiderWolf

What.

 

NERPS = Scripting system?

 

And, problems with variables? The only thing I recall you couldn't freely use were two timers.

Look at the nrm file for my Arctic Frenzy Level

TRUE ? SetTutorialFlags 0

TRUE ? SetMessagePermit 1

; Check for level fail

TRUE ? SetR1 0

GetToolstoresBuilt = 0 ? AddR1 1

GetMinifiguresOnLevel = 0 ? AddR1 1

GetR1 = 2 ? SetLevelFail

GetOxygenLevel < 1 ? SetLevelFail

;Slimy Slug CalltoArms

TRUE ? SetR2 0

GetMiniFiguresOnLevel > 5 ? AddR2 1

GetCrystalsCurrentlyStored > 10 ? AddR2 1

GetRandom100 = 1 ? AddR2 1

GetRandomTrueFalse = True ? AddR2 1

GetSlugsOnLevel < 2 ? AddR2 1

GetR2 = 5 ? GenerateSlug

; Check for level success

GetCrystalsCurrentlyStored > 49 ? SetLevelCompleted

It does not include the Base NERPs lines that the original maps do

;;;;;;;;;;;;;;;;;;;;;

; NERPs Source File ;

;;;;;;;;;;;;;;;;;;;;;

; Generated

; "Sep 21 1999"

;;;;;;;;;;;;;;;;;;;;;

; Stamp it here:

"22:53:19":

;;;;;;;;;;;;;;;;;;;;;

GetObjectiveSwitch ? SetMessagePermit 0

GetObjectiveSwitch ? :SkippedSkip

GetObjectiveShowing = 1 ? :Skip

SkippedSkip:

TRUE ? SetMessageTimerValues 1000 1000 10000

TRUE ? AddR0 1

TRUE ? SetR6 0

TRUE ? :end

Wbe:

GetMessageTimer > 0 ? Stop

TRUE ? SetTimer0 0

TRUE ? SetR0 0

TRUE ? AddR5 1

Stop

Skip:

TRUE ? SetTutorialFlags 4095

TRUE ? SetMessagePermit 1

TRUE ? SetTimer0 0

TRUE ? SetTimer1 0

TRUE ? SetTimer2 0

TRUE ? SetR0 0

TRUE ? SetR1 0    

TRUE ? SetR5 0

TRUE ? SetR7 1

TRUE ? CameraUnlock

Stop

Next:

TRUE ? AddR3 1

Clear:

TRUE ? SetR0 0

TRUE ? SetTimer0 0

TRUE ? AddR7 GetR5

TRUE ? SetR5 0

Stop

finish:

Stop

Complete:

GetMessageTimer > 0 ? Stop

TRUE ? SetLevelCompleted

Stop

end:

I beleive that is the same as not including #include <nerpnrn.h> if you were starting from an .nrn file?

Anyway it looks like I may have let myself get a bit confused by Baz's Scripting tutorial and what I read at the bottom of the nerpnrn.h were it says

// IMPORTANT NOTES:

/////////////////////

// Register 0 is reserved for per-message counting

// Register 2 is reserved for auto-function calling

// Register 3 is reserved for current-function counter

// Register 4 is reserved for initial function message number

// Register 5 is reserved for per-function message offset

// Register 6 is reserved for auto-function calling

// Register 7 is reserved for automatic message numbering

// thus leaving register 1 spare, which shall probably be needed for further NERPS++ development.

// Maybe sometime it could be an idea to set aside

// some extra registers especially for the above.

 

so thanks for responding anyway.

PS: Thank you for joining us for this episode of, "Watch Wolfy Be Embarresed After Asking Dumb Questions"!

Don't forget to join us again next week when Wolfy Asks: What is a Rock Raider's Favorite Food?

:P

Link to comment
Share on other sites

aidenpons

It does not include the Base NERPs lines that the original maps do

So? Providing it works... what do you need to do?

Link to comment
Share on other sites

RockRaiderWolf

 

It does not include the Base NERPs lines that the original maps do

So? Providing it works... what do you need to do?

 

to do what? If you mean in order to use all the Registers you'd use them the same way provided the nerpnrn.h was not referenced/included in your script. in other words using Get/Set/Add/SubR# with # being whatever register number you choose to use.

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.