Eclipse Origins 2.3 'Wait Custom Script'

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

Why not just use the resource editor for fishing, and such?

I am assuming and I might be wrong, it’ll use this in your custom script though:

Nah this won’t work. EventType.evWait.ActionTimer = GetTickCount + 15000

…I feel awfully stupid xD

Oh how I thank you so!

I’m going to sit in the Dunce’s chair for a bit…

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

Log in to reply