Jump to content

This Scripts work?


Guest

Recommended Posts

Posted
Scriptname A extends ReferenceAlias

Event OnHit
	Int Random = Utility.RandomInt(0, 10)
    
    If Random > 5
	GoToState("Run")
    return
    EndIf
EndEvent

State Run
	// DoSomething
    
    return // Is this return unnecessary?
EndState

----------------------------------------------
Scriptname B extends ReferenceAlias

// I hope If Random is above than 5 this event doesnt work
Event OnHit
	// Dosomething
EndEvent

 


According to probability, I want to do only one action in same event of two different mods.

In this scripts It works as I think?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...