Poll

Which icon should be used as the spot icon

Option 1
Option 2
Option 3

Author Topic: Player spotting device (item)  (Read 3512 times)

okay ill try it as a paint can.

Is the item model a paintcan, or does the paintcan keybind do the spotting(no item required)?

So far i can safely say that it semi works, you have to equip the item to spot but you can spot pressing e.
I have the text for the spotting
i need to figure out how to get the icon above the enemies head
and i need to figure out how to make the player play the Voice overs from his position

I thought this would work but it just plays the sounds from the enemy player's position
Code: [Select]
if(%client.slyrTeam.name !$= %enemyPlayer.client.slyrTeam.name)
{
commandToClient(%client,'bottomPrint',"<color:0aa000><just:left><font:Arial:20>\c6" @ %obj.toolAmmo[%obj.currTool] @ " *radio* " @ "Enemy Soldier Marked! " @ "", 4, 2, 3, 4);
serverPlay3D(Spot @ getRandom(1,5),%obj.getPosition());
// Mark goes above %enemyPlayer's datablock.
}


why the hell do we want this to be some dumb alternate weapon you have to switch over to?
in literally every single game on the planet with a spotting mechanic, you just press a key and it spots


here's what we actually need - overriding E key functionality to spot, no stupid spraycans or hand weapons

Quote
why the hell do we want this to be some dumb alternate weapon you have to switch over to?
in literally every single game on the planet with a spotting mechanic, you just press a key and it spots


here's what we actually need - overriding E key functionality to spot, no stupid spraycans or hand weapons
Well in order to do that wouldn't you have to put the spotting code in every weapon/item .CS file that you use? or

maybe make a player type that utilizes this?

No.

Package UsePaintCan, check if minigame is enabled, if it's slayer minigame, maybe if painting is enabled, if checks are passed then do this and return.

Erm excuse me. I already created the key bind in my original post. I just told you to insert the spotting code at the comment.
« Last Edit: January 26, 2015, 03:07:53 AM by Honorabl3 »

Maybe someone more experienced should make this?  -_-

Stoppppp, I gave you the code with the keybind already finished. Use this.
Code: [Select]
package spottingMod
{
function serverCmdActivateStuff(%client) // This overwrites using E for activating blocks in game. Clicking should still work fine.
{
%player = %client.player;
%start = %player.getEyePoint();
%end = vectorAdd(%start, vectorScale(%player.getEyeVector(), 12));
%mask = $TypeMasks::PlayerObjectType;
%result = ContainerRayCast(%start, %end, %mask, %player);
%enemyPlayer = getWord(%result, 0);
if(isObject(%enemyPlayer))
{
if(%client.slyrTeam.name !$= %enemyPlayer.client.slyrTeam.name)
{
// player messages other players
// Mark goes above %enemyPlayer's datablock.
}
}
}
};
activatePackage(spottingMod);

Maybe someone more experienced should make this?  -_-

Admittedly I agree with this.

make sure the spots are only visible to your team, and not the team of the person you spotted.

I have the item and the sounds, i also managed to get it to semi work, but yes someone more experienced should code this.

make sure the spots are only visible to your team, and not the team of the person you spotted.
Not really possible without your team needing a client sided mod.

whats the progress? anyone able to figure out how to make this fully work?

If there's any way I can help (Other than modeling), then tell me.