Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Space Guy

Pages: [1] 2 3 4 5 6 ... 410
1
Suggestions & Requests / Re: Guide on SpaceBots?
« on: February 03, 2018, 07:04:45 AM »
... Uh, okay then.

There's one from 2008, before Blockland v9. It had a GUI (on a keybind) or chat commands for making bots with one of a few fixed behaviours and 'patrol paths', and a 'bot spawn' brick which made the same kind of bots and respawned them when they died. It worked with that version's Team Deathmatch. This one actually comes with a manual PDF, if you got it from the "right" place.

There's a different one from 2010 which had the listed events, plus some "Bot Spawn" bricks that put the events together to make a tiny AI. It worked with Team Deathmatch and Iban's ZAPT.

In both versions the AI had some silly details like only being able to see what's in front of it/"hear" shots passing by and chasing to where it last saw you. They could use different weapons (hold down fire on a Bow, click spam on a Gun, charge a Spear) and were really accurate with projectiles. (Trigonometry - "where are you going to be when this spear lands") They don't do any of the detailed "navigation" from the Slayer topic.

Both of them used the deprecated/buggy "AIConnection" class which has been removed from recent versions of Blockland - it's not worth trying to get them to run again.

2
General Discussion / Re: older blockland user check-in.
« on: September 22, 2017, 04:29:33 PM »
Hello! BLF still shows up in my address bar, so I might as well check in.

3
General Discussion / Re: why is team deathmatch crc'd?
« on: June 19, 2017, 05:29:08 PM »
So, I booted it up quickly to try it out. The additions to the Minigames menu ('Teamkill: -1 point' in the Scoring section, etc) overlap with other controls, but the rest of the UI was fine. I can make and join teams. Team spawns, anti-friendly-fire, team chat, uniforms and equipment all worked. I have ZAPT installed, that one has never conflicted with TDM. Rotondo's zombies nearly always broke with the anti-friendly-fire.

Hole bots couldn't be damaged - I guess they're different enough from 'players joining minigames' and vehicle spawns that they don't count. That might have caused enough Help questions to get it banned.
I didn't test anything like loading team-spawns from saves, that might have also stopped working over time.

I'm pretty sure Slayer does all that while being a bit more compatible than something from 2010, though.

4
Add-Ons / Re: Output Event - setDamageFlash
« on: March 25, 2017, 03:53:44 AM »
Last.

5
Well, I've been waiting 5 years since Pload's Prison Escape ended, had to see it! Glad to see it at least at 10pm in the UK instead of 4am.

Didn't get to play long enough, but it's a great faithful remake. This is still the best game-mode I've ever played - gets everyone talking, making strategies and panicking on both sides. If you haven't already, definitely go play it next time.

6
Modification Help / Re: Key-Press Other Mounted Image Sequence
« on: January 29, 2016, 04:28:53 PM »
setImageAmmo(slot, 0 or 1) can cause stateTransitionOnAmmo and stateTransitionOnNoAmmo. Idle --(onAmmo)--> Animate --(onTimeout)--> Idle would keep looping while Ammo is set. There's another pair of transitions used with setImageLoaded for more complicated branching.

Functions are triggered by entering a state with e.g. stateScript[1] = "onReady", just being named "Ready" won't work.

7
Suggestions & Requests / Re: Working version of Event_onItemPickUp
« on: January 29, 2016, 01:26:57 PM »
I just downloaded it from there - it's working fine, with a few different events, in and out of minigames.

Console log? Can you narrow it down to any particular addon that's breaking it?

It won't trigger if you don't pick up the item - if all your slots are full, etc.

8
M&S Fizzy Fish were the best. They stopped making them, though.

9
Modification Help / Re: Get eye pitch angle on the client
« on: September 12, 2015, 03:54:43 AM »
EDIT: Oh, getEyeVector doesn't work clientside, sorry.

Muzzle vector of a different slot? 1-3 look the same as the eye vector, probably 'except for Free Look'.

10
Modification Help / Re: How do I make function for keybinds?
« on: July 08, 2015, 05:57:14 AM »
This function (still clientside) adds a keybind to an existing 'division' instead of having to make a new one. Excerpt from 'Auto Wrench', original by Randy.
Code: [Select]
function AddBind(%division, %name, %command)
{
for(%i=0;%i<$remapCount;%i++)
{
if($remapDivision[%i] $= %division)
{
%foundDiv = 1;
continue;
}
if(%foundDiv && $remapDivision[%i] !$= "")
{
%position = %i;
break;
}
}
if(!%foundDiv)
{
error("Division not found: " @ %division);
return;
}
if(!%position)
{
$remapName[$remapCount] = %name;
$remapCmd[$remapCount] = %command;
$remapCount++;
return;
}
for(%i=$remapCount;%i>%position;%i--)
{
$remapDivision[%i] = $remapDivision[%i - 1];
$remapName[%i] = $remapName[%i - 1];
$remapCmd[%i] = $remapCmd[%i - 1];
}
$remapDivision[%position] = "";
$remapName[%position] = %name;
$remapCmd[%position] = %command;
$remapCount++;
}
if(!$addedAutoWrenchBinds)
{
AddBind("Recording","Toggle Automatic Wrench","toggleAutoWrench");
$addedAutoWrenchBinds = true;
}

11
On a Player, applyImpulse does the same as addVelocity. The 'origin point' isn't used at all.
On a Vehicle/Physics object, as well as velocity, the origin point is used to apply angular momentum based on the datablock's mass and the new velocity vector. This is why the Rocket Launcher can flip over vehicles, etc.

Torque 3D (future version of TGE) code
https://github.com/GarageGames/Torque3D/search?utf8=%E2%9C%93&q=applyImpulse&type=Code
Code: [Select]
void Rigid::applyImpulse(const Point3F &r, const Point3F &impulse)
{
   atRest = false;

   // Linear momentum and velocity
   linMomentum  += impulse;
   linVelocity.x = linMomentum.x * oneOverMass;
   linVelocity.y = linMomentum.y * oneOverMass;
   linVelocity.z = linMomentum.z * oneOverMass;

   // Rotational momentum and velocity
   Point3F tv;
   mCross(r,impulse,&tv);
   angMomentum += tv;
   invWorldInertia.mulV(angMomentum, &angVelocity);
}
Code: [Select]
void Player::applyImpulse(const Point3F&,const VectorF& vec)
{
AssertFatal( !mIsNaN( vec ), "Player::applyImpulse() - The vector is NaN!" );

   // Players ignore angular velocity
   VectorF vel;
   vel.x = vec.x / getMass();
   vel.y = vec.y / getMass();
   vel.z = vec.z / getMass();

   // Make sure the impulse isn't too big
   F32 len = vel.magnitudeSafe();
   if (len > sMaxImpulseVelocity)
   {
      Point3F excess = vel * ( 1.0f - (sMaxImpulseVelocity / len ) );
      vel -= excess;
   }

   setVelocity(mVelocity + vel);
}
(The origin point isn't given a name, so isn't used)

12
Modification Help / Re: Mission Editor
« on: June 09, 2015, 03:26:03 PM »
http://luisantonrebollo.github.io/Torque-3D-Wiki-Test/Torque3D%20script%20reference/classGuiCanvas.html

There's a top-level GUICanvas named Canvas that is used to control the main screen: Canvas.setContent(PlayGui) - set the full-screen GUI to the FPS+HUD view, Canvas.pushDialog(MessageBoxOKDlg) - put an 'OK' box on screen, other method used to set its title/text.

It inherits from/"is a" GUIControl, which is why it's a thing you can add to GUIs. At a guess, this is to pass keyboard/mouse input to its contents (more GUIControls) in the same way. It might be usable for windows with complicated layers of subwindows.

13
Quote
%client.truePlayer = %client.player;
         %client.createPlayer(%truePlayer.getPosition());
%truePlayer doesn't exist (instead, use %client.truePlayer), so you're appearing at (0, 0, 0) which might be 'in the sky'.

Quote
%client.player.setNodeColor("ALL","0 0 0 0");
Use %client.player.hideNode("ALL");. Transparency doesn't work quite right.

empty.dts doesn't have a collision model. The player (m.dts) might not, I don't know - player collisions are a cylinder around you, not a model-to-model collision.

Still looking into 'collisions disabled on death'. I think it's to do with states like "onDisabled", but in the engine code rather than a callback we can see.

EDIT: If you do setDamageLevel(0) on a dead player, they become solid again, but can also get hurt and killed again! This might have weird effects with other add-ons.



Technical version:
https://github.com/GarageGames/Torque3D/blob/74a05854d56afe15cbc341575b73b3474af18277/Engine/source/T3D/player.cpp - Torque 3D is a future version of Torque Game Engine, but it's similar enough

You become Disabled when damaged beyond max health. (Conversely, you can become Enabled when setting damage below that again)
Code: [Select]
void Player::updateDamageLevel()
{
   if (!isGhost())
      setDamageState((mDamage >= mDataBlock->maxDamage)? Disabled: Enabled);
   if (mDamageThread)
      mShapeInstance->setPos(mDamageThread, mDamage / mDataBlock->destroyedLevel);
}

When this happens, your collision mask (= raycast typemasks) stops being a Player and becomes a Corpse.
Code: [Select]
void Player::updateDamageState()
{
   // Become a corpse when we're disabled (dead).
   if (mDamageState == Enabled) {
      mTypeMask &= ~CorpseObjectType;
      mTypeMask |= PlayerObjectType;
   }
   else {
      mTypeMask &= ~PlayerObjectType;
      mTypeMask |= CorpseObjectType;
   }

   Parent::updateDamageState();
}

Players collide (physics) with these things, which doesn't include corpses.
Code: [Select]
static U32 sCollisionMoveMask =  TerrainObjectType       |
                                 WaterObjectType         |
                                 PlayerObjectType        |
                                 StaticShapeObjectType   |
                                 VehicleObjectType       |
                                 PhysicalZoneObjectType;

14
Player::removeBody is scheduled for the 'delete + puff of smoke' after death. If you package/remove it, this might keep the 'real' body with the current mounted items/emitters when you die, instead of having to create a new one and mimic what the old one was doing. It should keep the direction you're facing, but I don't know how crouching interacts with removing death animations.

15
Modification Help / Re: "Respawning in " function call?
« on: April 18, 2015, 06:20:20 AM »
Code: [Select]
if(%isMini = isObject(%mini))
Shorthand for:
Code: [Select]
%isMini = isObject(%mini);
if(%isMini)
    ...
Then %isMini is used again later.

Pages: [1] 2 3 4 5 6 ... 410