[Map] The Lost City

User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: New Map: The Lost City

Post by S_hift »

repair.wav would be a good sound for a grav lift
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: New Map: The Lost City

Post by perrinoia »

Hmmmm... So, the trigger makes the noise instead of the player... Yes... That would probably be better...

I could start the noise at the start of the mission, rather than every time the trigger is triggered...
Image
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: New Map: The Lost City

Post by S_hift »

generator sound would be a good grav lift sound too.
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: New Map: The Lost City

Post by DaJ4ck3L »

perrinoia wrote:Hmmmm... So, the trigger makes the noise instead of the player... Yes... That would probably be better...

I could start the noise at the start of the mission, rather than every time the trigger is triggered...
I'd probably use a second looping function not related to the trigger, and just input the positions manually. Using this method you would probably need to add a few at each position so you continue to hear the sound as you fly up. It doesn't have a huge range.

Code: Select all

%pos = "0 0 0";
PlaySound("SoundWhatever",%pos);
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: New Map: The Lost City

Post by perrinoia »

But I want the sound to stop when the generators are raped.

Also, that's sloppy. ;)
Image
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: New Map: The Lost City

Post by DaJ4ck3L »

i knew you would say that. what your idea? :D

id imagine using the trigger to activate it, and having the trigger on loop. ohhh yea, that does make more sense when i say it out loud. my brain is sloppy lately.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: New Map: The Lost City

Post by perrinoia »

Code: Select all

function GroupTrigger::onAdd(%this){
    GameBase::playSound(%this, SoundEnergyPackOn, 0);
}
Was my idea, but it doesn't appear to work...
Image
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: New Map: The Lost City

Post by DaJ4ck3L »

maybe try something like this. also sloppy, but works.

Code: Select all

function checkKingsThrone()
{
	if(!$Legendz::Throne)
		return;
	
	$Kingevenodd = !$Kingevenodd; //switches from 1 to 0... tells every other check... used to check if in both new & old sets
	%set = newObject("throne"@$Kingevenodd, SimSet);  
	AddToSet("MissionCleanup\\Arena",%set);
	%pos=GetOffsetRot("-155.5 0 5.5","0 0 0",$Arena::Spawn);
	containerBoxFillSet(%set,$SimPlayerObjectType,%pos,14,14,20,0);
	%num = Group::objectCount(%set);
	
	for(%i = 0; %i < %num; %i++)
	{
		%obj = Group::getObject(%set, %i);
		%name = GameBase::getDataName(%obj);
		//echo(%obj@" <<<<< OBJ");
		%clientId = Player::getClient(%obj);
		//echo(%clientId.isTheKing@" <<< is he the king?");
		if(!%clientId.isTheKing)
		{
			%cl = %obj;
			%rotZ = getWord(GameBase::getRotation(%cl),2); 
			GameBase::setRotation(%cl, "0 0 " @ %rotZ); 
			%forceDir = Vector::getFromRot(GameBase::getRotation(%cl),-3000,3000); 
			Player::applyImpulse(%cl,%forceDir); 
			schedule("Client::sendMessage("@%cl@", 1,\"~wmale3.wbye.wav\");", 2, %cl);
		}
		else
		{
			%now = getSimTime(); //AFK System -DaJ4ck3L
			%clientId.lastActiveTimestamp = %now; //AFK System -DaJ4ck3L
			%obj.izking = true;
			%clientId.KingonThrone = true;
			%obj.onThrone = 1 + $Kingevenodd; //1 half the time & 2 other half... used to check if in this set while searching the old set
		}
	}
	%num = Group::objectCount($Kingset);
	for(%j = 0; %j < %num; %j++)
	{
		%obj = Group::getObject($Kingset, %j);
		%clientId = Player::getClient(%obj);
		%name = GameBase::getDataName(%obj);
		if(%obj.onThrone && %obj.onThrone != ($Kingevenodd + 1))
		{
			%obj.izking = false;
			%clientId.KingonThrone = false;
			%obj.onThrone = 0;
		}
	}
	deleteObject($Kingset); //delete the old set
	$Kingset = %set; //and replace with new set
	
	schedule("checkKingsThrone();", 1);
}
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: [Map] The Lost City

Post by perrinoia »

Huh? What does that do, besides send not the king to the moon?

%name = GameBase::getDataName(%obj); appears twice, but %name is never used.
if(!%clientId.isTheKing) appears once, but is never set (always false), unless it is set in another function.

Is this AFK code for the arena?
Image
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: [Map] The Lost City

Post by DaJ4ck3L »

it's the box check i use for the arena throne.

also %clientId.isTheKing variable is set elsewhere, and afk code is you you don't get kicked off while sitting on it.

just posting it to give options on other methods. plus i wanted to see what tweaks you would say about it. :D
Image
Post Reply