Skip to content

Instantly share code, notes, and snippets.

@scemino
Last active September 27, 2020 18:54
Show Gist options
  • Save scemino/aa6f36df76706aa68b7150326316b671 to your computer and use it in GitHub Desktop.
Save scemino/aa6f36df76706aa68b7150326316b671 to your computer and use it in GitHub Desktop.
First demo script of engge
include("Defines.nut")
include("Boot.nut")
function actorReachLow(actor, duration) {
return startthread(@() {
actorPlayAnimation(actor, "reach_low")
breaktime(duration)
actorPlayAnimation(actor, animStand)
})
}
startglobalthread(@(){
roomFade(FADE_OUT, 0)
cameraInRoom(Bridge)
cameraFollow(ray)
actorAt(ray, Bridge.startLeft)
roomFade(FADE_IN, 2.0)
breaktime(2)
actorFace(ray,FACE_FRONT)
breaktime(2)
sayLine(ray, "{eyes_front}Hello you recognize me ?", "I'm Ray from Thimbleweed Park™","Maybe you are asking yourself why does my mouth does not move while I'm talking?")
breakwhiletalking(ray)
breaktime(0.5)
sayLine(ray, "This is just because the developper of engge™ is lazy")
breakwhiletalking(ray)
breaktime(0.5)
sayLine(ray, "I'm here to present you engge™","engge™ is an opensource adventure game engine")
breakwhiletalking(ray)
breaktime(1)
sayLine(ray, "This is a little demo of what you can do with it","Ready?")
breakwhiletalking(ray)
breaktime(1)
sayLine(ray, "{eyes_left}I can look to the left","{eyes_right}I can look to the right","{eyes_front}Impressive no ?")
breakwhiletalking(ray)
breaktime(1)
sayLine(ray, "Ready for a fade animation ?")
roomFade(FADE_OUT, 2.0)
breaktime(2)
roomFade(FADE_IN, 2.0)
breaktime(2)
sayLine(ray, "OK, now a little bit of interaction","In a adventure game, you need to collect some objects")
breakwhiletalking(ray)
sayLine(ray, "Well, that's possible, let's pickup this bottle")
actorWalkTo(ray, bridgeBottle)
breakwhilewalking(ray)
local reachTID = actorReachLow(ray, 1)
breakwhilerunning(reachTID)
objectState(bridgeBottle, GONE)
actorPlayAnimation(ray, "stand")
breaktime(1)
sayLine(ray, "Hum, I will drink this later")
breakwhiletalking(ray)
sayLine(ray, "OK now, actor animation")
actorCostume(ray, "RayPhotoAnimation")
actorPlayAnimation(ray, "take_photo_kneal")
breakwhileanimating(ray)
breaktime(0.25)
sayLine(ray,"@25550")
actorPlayAnimation(ray, "take_photo_smile")
breakwhiletalking(ray)
actorPlayAnimation(ray, "take_photo_snap")
playObjectSound(soundPolaroidPhoto, ray)
roomOverlayColor(0xEEFFFFFF, 0x00000000, 0.1)
breaktime(0.3)
breakwhileanimating(ray)
sayLine(ray, "With engge, you can create your own script","You can even create your own adventure game")
sayLine(ray, "You can find the source of this script in the comment of this video")
sayLine(ray, "Thanks for watching")
roomFade(FADE_OUT, 2)
breaktime(2)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment