News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Mods > WoD Mod Pod > Ask a Coder

Reply
 
Thread Tools Display Modes
Old 1st Jan 2002, 10:23 PM   #1
Rainbow6
Probably Confused!
 
Join Date: Jan. 1st, 2002
Posts: 40
Question Various ScriptedPawn questions

Hey Everybody!

I am making a Terrorist actor that sub-classes ScriptedPawn. I can make him play animations, give him a gun, and make him die when shot enough.


How can I make him do the following?:

1.) Detect that the player is in his FOV
2.) Turn towards the player (the compiler doesn't allow it in any of my functions)
3.) Aim at the player at look like it's doing so
4.) Shoot at the player until he's dead or out of view
5.) Find the best path to a given actor
6.) AND, find a hostage with a given tag

Do I have to use states? If so, how?????

Thanks in advance,
Rainbow Six
Rainbow6 is offline   Reply With Quote
Old 1st Jan 2002, 10:50 PM   #2
Postal
I apear to have lost my pin.
 
Postal's Avatar
 
Join Date: Nov. 14th, 1999
Posts: 1,388
Hey, I plan to do soemthing similar, when I start, I try to contact you.
__________________

Peace through superior firepower.
Postal is offline   Reply With Quote
Old 2nd Jan 2002, 03:05 PM   #3
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,753
1) Normal(OtherPlayer.Location - Location) dot vector(ViewRotation) > someFloatValue
2) maybe TurnTowards(anActor), this is a latent function so it can only be used in state code, not in functions
3) I think that should be an animation
4) dunno, have a look at Botpack.Bot
5) also look at Botpack.Bot and the FindSpecialAttractionFor() function in Botpack.CTFGame
6) same like 5)

I guess you've got to use lots of states like other ScriptedPawns and UT's Bots.
Wormbo is offline   Reply With Quote
Old 2nd Jan 2002, 07:44 PM   #4
Rainbow6
Probably Confused!
 
Join Date: Jan. 1st, 2002
Posts: 40
1.) Your first response... What is it for, and exactly what is the syntax? It has interested me. Isn't there a bPlayerInView variable somewhere? SeePlayer doesn't seem to get called.

2.) TurnTo(Player.Location) doesn't seem to work, even inside state code. Is there a way to accomplish this using plain math?

3.) It IS an animation!! Thank you!

4.) Yeah, I'll take a peek at that. Thanks.

5.) Isn't there a FistBestPathTo(actorName) inside ScriptedPawn? Anyway, I'll take a look at that.

6.) I looked. The Mod Developer's guide at unreal.epicgames.com has a way to perform functions with a desired actor.


THANKS FOR ALL YOUR HELP!!
--Rainbow Six
Rainbow6 is offline   Reply With Quote
Old 12th Jan 2002, 06:38 PM   #5
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,753
1)
This is the dot product of two vectors: "Other.Location - Location" is the vector starting at the location of the actor this function is called from and ending at the location of actor Other. Normal() returns a vector with the same direction but a length of 1 Unreal unit. vector(ViewRotation) is a vector of length 1 pointing in the same direction as the rotator ViewRotation. The dot product of these two vectors can be:
> 0 (the vectors somewhat point in the same direction with a value of 1 indicating exactly the same direction)
< 0 (the vectors point in opposite directions, again -1 means exactly the opposite direction)
== 0 (both vectors form an angle of exactly 90)

(I hope this is what you wanted to know)#

2)
You could use Tick(), Timer() or state code with Sleep() to change the Rotation property (maybe with some vector math if you're not used to rotators.)
Wormbo is offline   Reply With Quote
Old 19th Jan 2002, 01:02 PM   #6
Call me Erdrik
Arch Mage
 
Call me Erdrik's Avatar
 
Join Date: Nov. 24th, 1999
Location: Spring Hill, FL, USA
Posts: 334
@Wormbo:
with
Normal(OtherPlayer.Location - Location) dot vector(ViewRotation) > someFloatValue
does the bot have to be looking dirctly at the OtherPlayer, or does the some FloatValue indicate a variance? I want
"Detect that the player is in his FOV "
but like a cone.....


Im not sure if I said that right
__________________
Call me Erdrik
-hvErdrik
-Erdrik

*PIMP*
DarkMagic
Boycott Fox!!! Down with the Evil Overlords!
Call me Erdrik is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:02 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer