How to make a ScripedPawn shooting a certain target on an event?

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

How to make a ScripedPawn shooting a certain target on an event?

Post by Barbie »

The subject says it: On an Event I want a ScripedPawn (running to and then) shooting at a certain target. Is that possible with some settings?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
EvilGrins
Godlike
Posts: 9668
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: How to make a ScriptedPawn shooting a certain target on an event?

Post by EvilGrins »

"Scripted".

Do you mean for a normal map or an intro map? Because that sounds like something for an introduction, like with a story and details, more than a standard gameplay map.

I'm searching through here now, because yes it is possible and it has been done. Another mapper did such a thing, for the introduction of a MonsterHunt map... I'm just not sure if it was this forum or on Hermskii's.

Additive: It was on Hermskii's · https://www.hermskii.com/forum/viewtopi ... =17&t=3208

It was continued on here · viewtopic.php?f=5&t=5063

The map "Rise of Evil" has an introduction with pawns playing out a scenario that is a preview for players to see before they get into it. Map suffered from a few problems, including doors that needed to be opened in a more Unreal1 fashion, and the default weapon being non-standard... but an impressive map all the same. That preview sounds like what you're asking for.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Red_Fist »

The only thing that ever had a chance is you post (stick it to the wall) an invisible enemy so they go there to kill it and inadvertently bump some trigger.

The other thing is in Ureal2 some "target" actor.

You can also turn hate on and off with a property changer.
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScriptedPawn shooting a certain target on an event?

Post by sektor2111 »

When you're done with spam you can take next facts in account:
- a Skaarj Warrior type is able to shoot what you want - including Birds, WoodenBoxes and all sort of actors;
- when it comes to Armed troopers - these are full retarded - unless you are spoofing a non-pawn target with a stationary pawn inside - FortStandard like - not sure what's next when comes rating and attitude code...;
- when you do such a map take in account that you might expect Accessed None due to fascinating ScriptedPawn routines.
Okay, summary:
- alarmtag - alarmpoint - alarm-pausing - tagged target in visible range - other settings and STOCK actors.
Do they work ? Not very sure in plain original MonsterHunt, but in other versions they definitely work because I tested these using "a IceSkaarj" turned later into "an IceSkaarj" with projectile "RocketMk2".
About making monster mad, it's doable probably at direct visual contact or... triggered - I used triggering method...
Do you need a demo-sample ?
Edit: Ummm, never mind...
Here is the "rocket science" with UT stock actors:
MH-Target_Demo.7z
(419.96 KiB) Downloaded 13 times
"AlternatePath" - new codes.
See what was doing LoathSome in his Domination type games - using fake decorations aka Pawns will probably work better...
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Barbie »

Haha, thanks for that. Of course I had a look at AlarmPoint, but obviously I overlooked "ShootTarget". *wiping the glasses*
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by sektor2111 »

With pleasure...
Today I washed (a good shower) my glasses... especially when I figured what is doable in 227 assets because I wanted them super cleaned - Where was my head all this time ? :!:
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Red_Fist »

I wish those alarm points didn't need to involve seeing anything. I would prefer a dispatcher like thing that you can trigger alarms when needed.
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScriptedPawn shooting a certain target on an event?

Post by sektor2111 »

Clearly you don't get how do these are working. NOT ALARMS are triggered but The Monster. In every single Coop map where you have functional alarms they are done in similar way - not those guessing based. These are rules from Unreal not my rules - with desired dedicated maps. Does it work or not ? Of course it works - demonstrated. Do I need to show a combination involving Patrolling and Alarming in the same time ? It's EASY as a pie.

To not forget custom scripting which makes things to behave like are two maps in one. In weekend monster gets mad, in the rest of days it's lazy, will need an immediate visual contact with players for doing something. Do not underestimate the power of MyLevel. A custom dispatcher does exactly what mapper wants.
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Red_Fist »

But lets say I push a button way on the other side of the map, Then it tells a scripted pawn to open a door through an event, not "seeing".
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScriptedPawn shooting a certain target on an event?

Post by sektor2111 »

Did you worked with a triggered delayed-patrol and a proximity trigger for ScriptedPawn around said door and it did not work ?
ScriptedPawn can play even a DM without to mess with "Roaming" order...
That's it, people have forgot how to work with ScriptedPawn.

Edit:A monster having a depression because of Covid-19 decided to suicide by jumping in lava.
What do you think ? Is this possible ? I say: Yes. Do you know how to do that ? After an announcement: Mr. Skaarj, your father has died... We are not gonna miss him...
After that, Skaarj goes sad opening bar's door, and is moving to a ledge jumping down in a nice lava explosion burning instantly. Huh ? Horror ?
These scenes are easy to do if you know A.I. stuff from Unreal which works in UT as well, disregarding what they said somewhere about old things "not working in UT" - fake news as usual, they work in big parts, else these can be even improved.
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Red_Fist »

"Alarm point" to be triggered WITHOUT seeing, no other actors involved other than the thing that sends the event to the alarm point.

Is what I would call a true alarm point, like telling 3 skaarj to rush a doorway before you open the door, but no, they can't "see" you. useless. do not fail, sorry it failed cuz we can't see you, LoL

And no patrolling, for a room we can't see there should be no patrolling going on, more useless actors.

In Unreal2 you can make them do whatever you want.
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by sektor2111 »

I ALREADY posted a sample some months ago where a Skaarj is coming in attack WITHOUT to see player. AND NO, these won't work without GOOD PATHS.
But I'll do recursive posting for everyone forgetting things quickly. Strategy it's the same as here, but in that Level I used patrolling which is not a must have...
Or I might do another scenario just because IT WORKS.
Exactly like here
viewtopic.php?f=5&t=12570&start=15#p102842
To not forget that I wrote actors for making a monster to play DM. Do you know what does that mean ? That means monster will hunt you down if map HAS PATHS. DM-Deck doesn't have any AlarmPoint but has paths. If Skaarj hunter is BIG unable to follow a 20×40 path, make it smaller - the same size as Player, simple as that. As a note: if paths are created based on a Krall capabilities, Bot will have flaws because... a Krall can jump more far than Bot...
Just make a MonsterHunt map and let me in with monsters...
At this moment, APRIL 2020, I have what I need for getting over boundaries at reachSpecs modifications and I can make paths for TITANS, the problem comes if Bot has a deal there and won't reach in point going retarded as it does in CTF-Command - Blue ramp - or even worst... I have to setup these somewhere in a large map separate from items and/or writing "head-nodes" discarding small "players". These are simple now days, at least for me they don't have too much difficulty... My lack of knowledge is around "Level-Design" not Pawns.
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by Red_Fist »

I only posted this so people can see what U2 is like and how they took original UT stuff and changed it to solve other problems.


Unreal 2 AI Scripting
Table of Contents
Overview
Getting Started
An Example Script
List of Events
Command Targets
List of Commands
Useful Properties
When Things Go Wrong
Developer Info
Miscellaneous
TBD Stuff
Red Text = TBD/TBI/Not Yet Implemented
Overview
(tbd: complete, review)
By default, Unreal 2 NPCs are autonomous – that is, they respond to incoming events and make their own
decision about how to react to these events. For example, an NPC receives a “you saw the player” or “you
heard a noise” message and decides to attack the player of investigate the noise. When autonomous, the
NPC makes all decisions about where to go what to do based on what it knows about its “environment”
(e.g. Which weapon should I be using? Can I shoot a rocket at the enemy, or is there a ledge in the way?)
and can respond to further incoming events according to the code that it is using. For example, if an NPC
loses sight of his enemy (because the enemy ran around a corner), the NPC might switch from an attacking
state to a searching state and eventually (if the enemy isn’t found) to a roaming state. If an NPC’s health
falls below a certain level, it might decide to run away from the enemy. These are all decisions that the
base AI code makes independently and automatically.
Alternatively, Unreal 2 NPCs can operate under “script control” by associating them with an AI script. An
AI script is a text file which contains specific commands which can be used to setup the NPC and to tell the
NPC where to go and what to do. A typical script might give the controlled NPC a rocket launcher and put
him on a patrol which causes him to move along a set path. When the NPC sees an enemy, the script might
contain commands which direct him to run to a specific area in the level and press an alarm button. Some
of the other things that scripts can be used for include

forcing an NPC to ignore enemies unless he takes damage

having the NPC head to a specific area when an explosion (trigger) occurs

having the NPC play a specific animation

telling the NPC to crawl or crouch

killing the NPC when he reaches a particular location

causing the NPC to fire a specific weapon at a specific target

telling the NPC that he should act “alert”

telling the NPC to wait where he is until he sees the player
Unreal 2 uses scripts in singleplayer to set up complex scenarios that could be extremely hard to implement
and control using autonomous AI code. For example, a squad of marines can be scripted to maintain a
particular formation and to use specific animations. Once the squad sees an enemy, they might split into 2
smaller squads which are told to hold their formation until they take damage, at which point they will
attack the enemy. In many cases, the end result will look much better than anything that could be achieved
using code to carry this out autonomously.
AI scripts can also be used in conjunction with the Unreal 2’s dialog system to specify dialogs that an NPC
should initiate (e.g. “find the player and play the “we’re under attack” dialog”) and to handle any
“commands” issued by the dialog system both in response to a choice made when a dialog session
terminates (e.g. “go to the left tower”) or in response to mid-session directives from the dialog system (e.g.
“go over to the console” ).
Note that the AI scripting support is nothing like a “real” language in that it doesn’t support named
variables and complex control statements and expressions as does UnrealScript, for example. The AI
scripting support is basically a command interpreter which exposes the underlying AI functionality in a
(hopefully) user-friendly manner with only limited support for storing/retrieving values and for
implementing test and branch situations.
Also, AI scripts should be idle (e.g. sleeping or handling a gotoactor etc.) as much of the time as possible
since script commands are generally “interpreted” at the time that they are executed. Although some pre-
processing is done, e.g. to store the command “op codes”, there is potentially a lot of overhead associated
with executing script commands. A script which puts an NPC on some patrol, while occasionally playing
random chat is fine, a script which checks for all PathNodes within 8192 units every 0.2 seconds will
probably impact the game’s framerate noticeably. Generally, the kinds of things that are computationally
expensive should be handled “autonomously” – let the NPC go off his script to fight enemies, for example.
If you find yourself writing complex scripts, you should ask yourself whether the situation could be better
handled in UnrealScript, perhaps with a new command to hook into the new functionality
Attachments
U2AIScripting.pdf
(2.71 MiB) Downloaded 9 times
Last edited by Red_Fist on Thu Apr 23, 2020 10:27 pm, edited 4 times in total.
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by sektor2111 »

These are customized and some of them can be ported/copied to UT.
I'm not sure how many MH mappers are interested here. Majority are doing the same thing to monsters since forever: Waiting/Blocked Monsters, map has to be more dumb as possible without any difficulty, like only baboons are playing MonsterHunt.
Not a single time when a player was killed a single time, he left server. In DM against players you can die X times. What's the problem ? Re-Spawn did not worked ?
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: How to make a ScripedPawn shooting a certain target on an event?

Post by papercoffee »

sektor2111 wrote: Thu Apr 23, 2020 10:07 am Not a single time when a player was killed a single time, he left server. In DM against players you can die X times. What's the problem ? Re-Spawn did not worked?
When the map has no spawn points (or teleporters) to a farther region or even worse, near the end and you died by the final boss ............. I would leave as well, because running all the way through the map again... is uncool.
Post Reply