Hi guys.
It's again me, the noob that know nothing about coding. Anyway, I need again your help.
I know the function .LineSightTo, or something similiar. The par is an actor, and the function is very useful. But what I need is another thing. As you know (no, you really don't know) I'm trying to make a Betrayal mode, and I am a good point (lol, really).
Basically, if player A shoots with the secondary fire of his weapon (the modified InstaGib version), and a bot (specifically, one of player's mates) sees it, THEN DO X.
The problem is the part of the bot seeing the projectile (the beam of the InstaGib rifle) but in another mode. I could trying to do something like if a player shoots with the secondary rifle and his crosshair is near the bot, THEN DO X. But it would be not an ideal solution.
What do, guys?
Check if bot see a projectile
- Voodoo Doll
- Average
- Posts: 42
- Joined: Wed Aug 03, 2011 2:27 am
- Location: Russian Federation
Re: Check if bot see a projectile
maybe need to execute foreach(visiblecollidingactors(class<Projectile_class>)) checking on appropriate bot via special inventory class or mutator bot class, etc. but this way eats CPU much...
-
- Inhuman
- Posts: 958
- Joined: Wed Mar 31, 2010 9:02 pm
- Personal rank: I am quite rank.
- Location: MrLoathsome fell out of the world!
Re: Check if bot see a projectile
Perhaps you could modify the InstaGib weapon itself, so the alt fire triggers bots within the radius you need to do X.
The foreach search in that case should be less harsh on the CPU I think.
Correct me if I am wrong.
The foreach search in that case should be less harsh on the CPU I think.
Correct me if I am wrong.
blarg