Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Eclipse Origins 2.3 'Wait Custom Script'


Emosyos
 Share

Recommended Posts

Hey,

I was just curious at to how I would make a custom command that halts for 15 seconds before continuing the rest of the event. This is for fishing as I would like it to be an aspect of the game. This would me much appreciated as I haven't made a custom script for the event system before.

~The Pug Lord
Link to comment
Share on other sites

For anyone else that may want to know how a wait function can work in a Custom Script event, here you go; Thanks to Mod Matt!

```

Public Sub CustomScript(index As Long, caseID As Long)

Select Case caseID

Case 1

CustomWait 5000
PlayerMsg index, "Yo wait 15 seconds.", Yellow
CustomWait 15000
PlayerMsg index, "Yo this works?", Yellow

Case Else
PlayerMsg index, "You just activated custom script " & caseID & ". This script is not yet programmed.", BrightRed
End Select
End Sub

Public Sub CustomWait(ByVal Timer As Long)
Dim TempTimer As Long

TempTimer = GetTickCount

Do While (TempTimer + Timer) >= GetTickCount
If (TempTimer + Timer) = GetTickCount Then
' Just wasting time.
End If
DoEvents
Loop

End Sub

```
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...