Author Topic: Bots that CAN be hurt  (Read 1715 times)

Because %sentry.client.player IS %sentry, you could still just do %sentry.client. You could also do %sentry.client.player.client.player.client.player.client.player.client.player.client.player.client and get the same result.
Giving the client a .player and giving that player the .client makes it into a stable reference loop required by several core functions.
Ah, that really explains it.
Lol @ %sentry.client.player.client.player.client.player.client.player.client.player.client.player.client

And yay, it worked.

No lock, because i suspect i need some more help in the near future. :/

EDIT:
I am wondering, where did you learnt that?
I mean, so far i get my knowledge from playing with scripts and the torque functions guide, but what else could you advise me to read or whatever?
« Last Edit: May 13, 2010, 06:21:48 PM by lordician »

I learned from experience and logic.
I gained scripting experience from time and other mods, such as RTB 1.045 and mods made for it.

I learned from experience and logic.
I gained scripting experience from time and other mods, such as RTB 1.045 and mods made for it.
Okay.
Also, my question about the name displaying in the CI still stands.
Also, when i kill it a CI pops up and displays i killed something without name.
Any idea on how to fix that?
My attempt:
Code: [Select]
%name = (%client.player.client.name @ "'s Sentry");
%sentry.client.name = %name;
This would get the name of the player that spawned the sentry and add: "'s Sentry" to it.
Surprisingly, it didn't work.
« Last Edit: May 13, 2010, 06:30:56 PM by lordician »

As far as I know you would need to package the AiConnection::getPlayerName function, but Badspot prevented that to stop impersonations.

Another way would be rewriting the onDeath function, which may be difficult.

As far as I know you would need to package the AiConnection::getPlayerName function, but Badspot prevented that to stop impersonations.

Another way would be rewriting the onDeath function, which may be difficult.
Hmm, i noticed something earlier that someone might have used to do it easier:
Support_SpecialKills.cs

Could that be?
It is also in Event_Bots.

A short explanation of how to use it would be great.
(Probably a good question for Space Guy, since he made it.)

I noticed a piece of code used by multiple bot add-ons:
Code: [Select]
%zg = new SimSet (%foo)
{

};
MissionCleanup.add(%zg);
What is this Simset, what is it used for and do i need it?
A search into the functions guide didn't make it clear so far.
« Last Edit: May 13, 2010, 06:42:27 PM by lordician »

Maybe. I haven't looked into it.

Maybe. I haven't looked into it.
Did you notice my edit yet?
(Edited stuff is beneath the line)

I posted my edit 5 seconds before your post..

A simset is just a way to organize objects into one group, while still keeping them in their original group aswell. That one is used for keeping bots in one group.

Support_SpecialKills is a way to add modifiers to the standard death message, originally for the Push Broom Reflector mod to add the 'reflected projectile' icon as well as the standard CI.

Amade used it in his mod to display the set name of the bot instead of blank in the death messages.

You can no longer set player (or bot) client names through any method by script.

Support_SpecialKills is a way to add modifiers to the standard death message, originally for the Push Broom Reflector mod to add the 'reflected projectile' icon as well as the standard CI.

Amade used it in his mod to display the set name of the bot instead of blank in the death messages.

You can no longer set player (or bot) client names through any method by script.
So if i apply it like Amade did, i could change the blank spot to a name?

And if i am correct, you can't set a real name without such a hack.
Am i correct?

I ran into a new problem. :x

I want the bot to know who his creator was, even if the creator died once.
However, when the creator dies, the bot won't recognize him anymore.
I was thinking that perhaps i could solve this with a simset, or perhaps there is a better way?
Now i let him recognise his creator like this:
Code: [Select]
%obj !$= %id.client.bot
%obj is the bot in this case, %id is the player it found in the containersearch.

I assume the client gets swiped (or you get a new one) when you die, but i need it to recognize the creator even after a respawn.

Or is this impossible?

Player disappears when you die, client is persistent.

Having just one bot per owner seems very limited, though.

Player disappears when you die, client is persistent.

Having just one bot per owner seems very limited, though.
Yes, but multiple sentries would be to luxerious, right? :D