145 lines
No EOL
4.3 KiB
Text
145 lines
No EOL
4.3 KiB
Text
base.cr.sendSetZoneMsg(6969)
|
|
from pandac.PandaModules import *
|
|
from direct.actor.Actor import Actor
|
|
from direct.showbase.DirectObject import DirectObject
|
|
from direct.showbase.ShowBase import ShowBase
|
|
from direct.interval.IntervalGlobal import Func, Wait, Sequence
|
|
|
|
#Toon HQ Message Sequence
|
|
def toonHQMsg1():
|
|
base.localAvatar.setSystemMessage(1,'You Have Just Activated A Land Made By greencathacks')
|
|
def toonHQMsg2():
|
|
base.localAvatar.setSystemMessage(1,'Have Fun!')
|
|
def msgHQ():
|
|
hqs = Sequence()
|
|
hqs.append(Func(toonHQMsg1))
|
|
hqs.append(Wait(1))
|
|
hqs.append(Func(toonHQMsg2))
|
|
hqs.start()
|
|
msgHQ()
|
|
|
|
#Teleportation Sequence
|
|
def openBook():
|
|
base.localAvatar.b_setAnimState('OpenBook')
|
|
def readBook():
|
|
base.localAvatar.b_setAnimState('ReadBook')
|
|
def closeBook():
|
|
base.localAvatar.b_setAnimState('CloseBook')
|
|
def teleportOut():
|
|
base.localAvatar.b_setAnimState('TeleportOut')
|
|
def teleportIn():
|
|
base.localAvatar.setXYZH(744, 1044, 142, -766)
|
|
base.localAvatar.b_setAnimState('TeleportIn')
|
|
def teleportAnims():
|
|
tps = Sequence()
|
|
tps.append(Wait(2))
|
|
tps.append(Func(openBook))
|
|
tps.append(Wait(1))
|
|
tps.append(Func(readBook))
|
|
tps.append(Wait(1.0))
|
|
tps.append(Func(closeBook))
|
|
tps.append(Wait(2.0))
|
|
tps.append(Func(teleportOut))
|
|
tps.append(Wait(4.0))
|
|
tps.append(Func(teleportIn))
|
|
tps.start()
|
|
teleportAnims()
|
|
|
|
#Land Hotkeys
|
|
def collisionsOff():
|
|
base.localAvatar.collisionsOff()
|
|
base.localAvatar.setSystemMessage(base.localAvatar.doId, "Collisions De-activated!")
|
|
base.accept("f1", collisionsOn, [])
|
|
def collisionsOn():
|
|
base.localAvatar.collisionsOn()
|
|
base.localAvatar.setSystemMessage(base.localAvatar.doId, "Collisions Activated!")
|
|
base.accept("f1", collisionsOff, [])
|
|
base.accept("f1", collisionsOff, [])
|
|
|
|
#Sky Color
|
|
gloves = loader.loadTexture("phase_2/maps/stars.jpg")
|
|
base.localAvatar.findAllMatches('**/').setTexture(gloves, 1)
|
|
base.localAvatar.findAllMatches('**/Sky').setTexture(gloves, 1)
|
|
|
|
#Land Music
|
|
bgMusic1 = base.loader.loadSfx("phase_2/audio/will_and_elizabeth.mp3")
|
|
bgMusic1.setLoop(True)
|
|
bgMusic1.play()
|
|
|
|
#Land Objects
|
|
pier = loader.loadModel("phase_5/models/islands/pier_1_kings.bam")
|
|
pier.reparentTo(render)
|
|
pier.setPos(906, 1212, 126)
|
|
pier.setHpr(90, 0, 0)
|
|
|
|
mansion = loader.loadModel("phase_4/models/buildings/pir_m_bld_eng_mansion.bam")
|
|
mansion.reparentTo(render)
|
|
mansion.setPos(1091, 1277, 142)
|
|
mansion.setHpr(-78, 0, 0)
|
|
|
|
boat = loader.loadModel("phase_4/models/shipparts/pir_m_shp_frg_light.bam")
|
|
boat.reparentTo(render)
|
|
boat.setPos(1028, 1286, 143)
|
|
boat.setHpr(-78, 0, 0)
|
|
boat.setScale(0.2)
|
|
|
|
environ = loader.loadModel("phase_4/models/buildings/pir_m_gam_can_cannonOverlay_portRoyal.bam")
|
|
environ.reparentTo(render)
|
|
environ.setPos(1003, 1366, 158)
|
|
environ.setHpr(100,0,-10)
|
|
environ.setScale(1)
|
|
|
|
sign = loader.loadModel("phase_4/models/props/construction_sign.bam")
|
|
sign.reparentTo(render)
|
|
sign.setPos(963, 1341, 155)
|
|
sign.setHpr(10,0,0)
|
|
|
|
from pandac.PandaModules import *
|
|
from direct.actor.Actor import Actor
|
|
from direct.showbase.DirectObject import DirectObject
|
|
from direct.showbase.ShowBase import ShowBase
|
|
from direct.interval.IntervalGlobal import Func, Wait, Sequence
|
|
|
|
|
|
f = loader.loadModel("phase_9/models/cogHQ/Elevator.bam")
|
|
f.reparentTo(render)
|
|
f.setHpr(90,0,0)
|
|
f.setPos(1032,1319,149)
|
|
f.setScale(2)
|
|
pandaPosInterval22 = f.posInterval(13,Point3(1032,1319,160),
|
|
startPos=Point3(1032,1319,149))
|
|
pandaPosInterval33 = f.posInterval(13,Point3(1032,1319,149),
|
|
|
|
startPos=Point3(1032,1319,149))
|
|
pandaHprInterval11 = f.hprInterval(3,Point3(0,0,0),
|
|
|
|
startHpr=Point3(0, 0, 0))
|
|
pandaHprInterval22 = f.hprInterval(3,Point3(0, 0, 0),
|
|
|
|
startHpr=Point3(0, 0, 0))
|
|
pandaPace = Sequence(pandaPosInterval22,
|
|
pandaHprInterval11,
|
|
pandaPosInterval33,
|
|
pandaHprInterval22,
|
|
name="pandaPace")
|
|
pandaPace.loop()
|
|
f.find('**/wall_back').removeNode()
|
|
f.find('**/wall_front').removeNode()
|
|
f.find('**/wall_left').removeNode()
|
|
f.find('**/wall_right').removeNode()
|
|
f.find('**/ceiling').removeNode()
|
|
r = loader.loadModel("phase_9/models/cogHQ/Elevator.bam")
|
|
r.setPos(1032,1319,149)
|
|
r.setHpr(0,340.30,0)
|
|
r.setScale(50)
|
|
r.hide()
|
|
r.reparentTo(render)
|
|
r.find('**/wall_back').removeNode()
|
|
r.find('**/wall_front').removeNode()
|
|
r.find('**/wall_left').removeNode()
|
|
r.find('**/wall_right').removeNode()
|
|
r.find('**/ceiling').removeNode()
|
|
|
|
dsg = f.findAllMatches('**/')
|
|
ds = loader.loadTexture("phase_2/maps/triangle.jpg")
|
|
dsg.setTexture(ds, 1) |