Author Topic: I need a few things  (Read 900 times)

I am currently hosting this: http://forum.blockland.us/index.php?topic=285002.0

However i need a few events and a few items.

1. I need an addition to Zone Bricks that detects what slayer team a player is in when they step into the zone, its like the onPlayerTouch(Team1) events that slayer has, instead it would be OnPlayerEnterZone(Team1)

2.I need the input event OnBotAltActivate, so when the bot is activated with the RMB.

3.I need someone to translate this psuedo code
Code: [Select]
origin = origin-of-sound.getTransform();
for all clients
{
     transform = client.Transform()
     distance = vectorDist(origin, transform)

     if(dist < 50)
          play sound 1 - client.play3D(yourSound, origin)
     else if(dist < 100)
          play sound 2
     else
          play sound 3
}

4. This one might sound tedious but i need an item that allows a player to place items/Bricks. I was thinking a way to do this would be to give this item its own brick menu so you can only select items and bricks from this menu and not the actual brick menu thats used for building because i want to use this system to place or build items/bricks that are specific to the game mode. When you equip the item you could press RMB to pick an item/brick, then LMB to place it.

5. An older version of Physics Death, my current version doesnt un-equip the item when a player dies, i need a version that does un equip items on death.

Hope this isnt too much to ask.

--Reserved--

I will be adding things to this topic as i think of them.


3. What is the idea of that?

3. What is the idea of that?
so you could possibly have a gun sound really close to you sound like an actual gun, but if you're far away you'll hear like a muffled boom or something
i think that's what that is supposed to be

Yeah, I don't think the engine would be good at this, but you can't really tell where sound locations are unless you made it play sounds and keep the location cached, or if you package the serverPlay3D(%shapeBase, %transform), in which I have no idea if you can even package it.

Yeah, I don't think the engine would be good at this, but you can't really tell where sound locations are unless you made it play sounds and keep the location cached, or if you package the serverPlay3D(%shapeBase, %transform), in which I have no idea if you can even package it.
there is a %client.play3D(profile, pos) you know
you don't have to package anything

1. I need an addition to Zone Bricks that detects what slayer team a player is in when they step into the zone, its like the onPlayerTouch(Team1) events that slayer has, instead it would be OnPlayerEnterZone(Team1)
I think slayer has VCE support, so you can check teams using the variables

3.I need someone to translate this psuedo code
Code: [Select]
origin = origin-of-sound.getTransform();
for all clients
{
     transform = client.Transform()
     distance = vectorDist(origin, transform)

     if(dist < 50)
          play sound 1 - client.play3D(yourSound, origin)
     else if(dist < 100)
          play sound 2
     else
          play sound 3
}
what do you want it translated to? psuedocode is normally one of the most basic ways of communicating an idea
do you want it translated to words? torquescript? java?

5. An older version of Physics Death, my current version doesnt un-equip the item when a player dies, i need a version that does un equip items on death.
you could use a dropitems on death addon

there is a %client.play3D(profile, pos) you know
you don't have to package anything
Since when did this exist?

But what I am trying to say is trying to figure out where exactly the origin of the sound is. Not all add-ons use %client.play3D()

Sorry for the mis-communication on Number 3. I need this function to detect players within different radii. For example if a player is in a 10 Unit radius from the gun shot, it plays the core gun shot, 70 Units, a distant pop, beyond that is a a soft popcorn sound.
Quote
you could use a dropitems on death addon
could you link me?

Quote
I think slayer has VCE support, so you can check teams using the variables
I dont think there is an "Ifteam" variable unless i could use ModVariable. IF i have a downloaded VCE, does that over write Slayer's VCE?

I don't think there is an ifteam event/variable, but I do think there is a variable slayer adds that says which team a player is on

and I don't think slayer overrides VCE, but instead adds to it

and the drop items on death should be in an RTB archive

Since when did this exist?

Since forever? serverPlay3D runs a loop over all clients and calls .play3d, what's asked in the OP is perfectly possible

Sorry for the mis-communication on Number 3. I need this function to detect players within different radii. For example if a player is in a 10 Unit radius from the gun shot, it plays the core gun shot, 70 Units, a distant pop, beyond that is a a soft popcorn sound.
Code: [Select]
function determineGunSound(%pos)
{
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%client = clientGroup.getObject(%i);

if(!isObject(%player = %client.player))
{
continue;
}

%newPos = %player.getPosition();
%dist = vectorDist(%pos, %newPos);

if(%dist <= 50)
{
%client.play3D(gunSound1);
}

else if(dist <= 100)
{
%client.play3D(gunSound2);
}

else
{
%client.play3D(gunSound3);
}
}
}
You need to call the function when the projectile hits something, or whenever else you want.
« Last Edit: September 17, 2015, 07:52:27 AM by jes00 »