GATE ANIMATION

Forum Archive - from http://theuniversal.net
Locked
User avatar
matias
World Owner
World Owner
Posts: 46
Joined: Wed Apr 24, 2013 7:37 pm

GATE ANIMATION

Post by matias »

http://www.youtube.com/watch?v=25c7sxDeANM



The animation of the Gate in my world

Code: Select all

EVENT("accessbuilding", "8")
{
	if ( $gPlayerID != $gBuildingOwnerID )  
	{
	$ret = Gateother()
	}
	Else if ( $gPlayerID = $gBuildingOwnerID )
	{
	$ret = Gateowner()
	}
}

	EVENT("OSDSELECT", "Statusgate:1")
	{
	EVENT("&command","Animation")
	{
	*changebuilding $gBuildingAccessNum,13
	sleep(80)
	*changebuilding $gBuildingAccessNum,12
	}
}


EVENT("accessbuilding", "12")
{
	if ( $gPlayerID != $gBuildingOwnerID )
	{
	$ret = Gateother()
	}
	Else if ( $gPlayerID = $gBuildingOwnerID )
	{
	$ret = Gateowner()
	}
}

EVENT("OSDSELECT", "Statusgate:2")
{
	EVENT("&command","Animation")
	{
	*changebuilding $gBuildingAccessNum,14
	sleep(80)
	*changebuilding $gBuildingAccessNum,8
	}
}
____________________________________________________________________________
Function	GateOwner()
{
	osdcreate(OSDBUILDING, "Statusgate", "sysGetBuildingName")
	osdadditem(OSDBIGTEXT, "", "Choose Here the Gate Status")
	osdadditem(OSDBIGTEXT, " ", "")
	osdadditem(OSDBIGTEXT, " ", "")
	osdadditem(OSDEXITBUTTON,"1", "OPEN")
	osdadditem(OSDEXITBUTTON,"2", "CLOSE")
	osdactivate()
}


Function	Gateother()
{
	osdcreate(OSDBUILDING, "Statusgate", "sysGetBuildingName")
	osdadditem(OSDBIGTEXT, " ", "You must be the owner to get access")
	osdadditem(OSDBIGTEXT, " ", "")
	osdadditem(OSDBIGTEXT, " ", "")
	osdadditem(OSDEXITBUTTON, "exit", "OK")
	osdactivate()
}
Locked