For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
?difficulty=...
-
Smirftsch
- Administrator
- Posts: 9008
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
?difficulty=...
was wondering- now that 227 is in a stage to think about this, i have short question:
The difficulty in Unreal is way to easy- even in "Unreal" mode its (at least for me) just like walking through it. No real challenge. So my thoughts are to adjust the ingame difficulty, so that "Hard" is hard and "Unreal" really Unreal. I know there are some mods to adjust it, but why not adjusting it right now?
I didn't look into all this yet, but maybe someone of you can provide me with some informations and opinions.
Do you agree with me?
What needs to be changed?
The difficulty in Unreal is way to easy- even in "Unreal" mode its (at least for me) just like walking through it. No real challenge. So my thoughts are to adjust the ingame difficulty, so that "Hard" is hard and "Unreal" really Unreal. I know there are some mods to adjust it, but why not adjusting it right now?
I didn't look into all this yet, but maybe someone of you can provide me with some informations and opinions.
Do you agree with me?
What needs to be changed?
Sometimes you have to lose a fight to win the war.
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: ?difficulty=...
What about just adding a 5th difficulty? you'd really only have to change the menu a tad to add that. I'm pretty sure there's nothing actually preventing difficulty from exceeding 3.
for actually making it more difficult... well increasing enemy health/damage is the most standard thing done. You can't also add more monsters because that'd require changing the maps. I think the most effective way to make the game more difficult would be to improve the AI....... but I'm sure that'd be a monumental task. I'd help with that if I thought I could. I tried making a warlord with better tactics once. Didn't quite work out.
for actually making it more difficult... well increasing enemy health/damage is the most standard thing done. You can't also add more monsters because that'd require changing the maps. I think the most effective way to make the game more difficult would be to improve the AI....... but I'm sure that'd be a monumental task. I'd help with that if I thought I could. I tried making a warlord with better tactics once. Didn't quite work out.
Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
Shivaxi
- OldUnreal Member
- Posts: 2232
- Joined: Wed Mar 08, 2006 4:43 pm
Re: ?difficulty=...
Well you could just make a mutator to make the monsters right? Just make the mutator like a seperate system file that comes with 227.
Infact...you could make the mutator for ANY version of Unreal lol
Infact...you could make the mutator for ANY version of Unreal lol
-
Tronovision
- OldUnreal Member
- Posts: 160
- Joined: Fri May 04, 2007 10:58 pm
Re: ?difficulty=...
In addition to the suggestions listed by Bane, what if you made ammo, health and other pickups more scarce in a more difficult setting by changing the number of "units" given for pickups. For example, if a box of ammo normally gives 50 rounds, make it give only 25 rounds. This would encourge more strategy and make the player choose when and when not to use their resources.
-
TCP_Wolf
- Administrator
- Posts: 1078
- Joined: Sun Mar 03, 2002 12:04 pm
Re: ?difficulty=...
I am not a coop/single player expert, but I believe the pawn replacer mod rewrites the correct orders to the pawns, so the replaced monsters perform triggered and programmed actions just like the original ones.You can't also add more monsters because that'd require changing the maps.
It might be conceivable to simply add monsters and either give the added ones identical tags/orders or just give it orders to follow the "leader" (original monster) around. Suitable spawn locations around the original monsters are not too difficult to figure out either (usually
All true lol! AI programming is utmost insanity if you want to make it really good.I think the most effective way to make the game more difficult would be to improve the AI....... but I'm sure that'd be a monumental task. I'd help with that if I thought I could. I tried making a warlord with better tactics once. Didn't quite work out.
-=]HONESTY PAYS[=-
-
Pitbull
- Administrator
- Posts: 1225
- Joined: Fri Oct 04, 2002 6:47 pm
- Location: Between Venus and Mars
Re: ?difficulty=...
Why not just add more difficulty options. Keep the original intact and add maybe two or three more under a different name. This way if someone new does happen to install unreal they have the option to play the old settings.was wondering- now that 227 is in a stage to think about this, i have short question:
The difficulty in Unreal is way to easy- even in "Unreal" mode its (at least for me) just like walking through it. No real challenge. So my thoughts are to adjust the ingame difficulty, so that "Hard" is hard and "Unreal" really Unreal. I know there are some mods to adjust it, but why not adjusting it right now?
I didn't look into all this yet, but maybe someone of you can provide me with some informations and opinions.
Do you agree with me?
What needs to be changed?
Upon this rock I will build my church
LOADING HATERS..████████████] 99% Complete.
LOADING HATERS..████████████] 99% Complete.
-
Smirftsch
- Administrator
- Posts: 9008
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
Re: ?difficulty=...
because...
I tried it with a dedicated server, to increase the difficulty alone didnt seem to have much effect. I need to look into all this yet, but i don't think it'll make much difference.
I tried it with a dedicated server, to increase the difficulty alone didnt seem to have much effect. I need to look into all this yet, but i don't think it'll make much difference.
Sometimes you have to lose a fight to win the war.
-
Buster
- Global Moderator
- Posts: 1615
- Joined: Wed Jun 08, 2005 3:02 am
Re: ?difficulty=...
As far as I understand it, which is NOT that much at all. The "difficultiy" settings change the "math" of the Bot (etc). For example, instead of having an accuracy of 70% +/- 5% (8 out of 10 times) with a setting of 2, you'd get 80% +/- 7% (9 out of 10 times). Or some kind of arcane thing like that.
To change the actual "AI" of the Bot would require script changes. For "better" AI of the Bots (which would enhance all of the difficulty settings for them) use the UTeamFix10 "enhanced Bots" feature. I've noticed slight (and better) behaviour patterns and reactions with the Bots when using UTeamFix10 feature.
But as I said, I could be just plain wrong about this. I'm NOT a scripter. I do know how to slightly modify existing scripts (weapons and pickups, etc), but that's about it. Sorry I can't be abit more help.
To change the actual "AI" of the Bot would require script changes. For "better" AI of the Bots (which would enhance all of the difficulty settings for them) use the UTeamFix10 "enhanced Bots" feature. I've noticed slight (and better) behaviour patterns and reactions with the Bots when using UTeamFix10 feature.
But as I said, I could be just plain wrong about this. I'm NOT a scripter. I do know how to slightly modify existing scripts (weapons and pickups, etc), but that's about it. Sorry I can't be abit more help.
Gatherstone - Unreal by Design
https://gatherstone.oldunreal.com
OK - he falls
Keep it Unreal !!
:-)_~
https://gatherstone.oldunreal.com
OK - he falls
Keep it Unreal !!
:-)_~
-
TCP_Wolf
- Administrator
- Posts: 1078
- Joined: Sun Mar 03, 2002 12:04 pm
Re: ?difficulty=...
What you are referring to is the SKILL setting for bots. Difficulty affects monster AI though.
There are more settings for both critters and bots that sum up the total "skill" of either though, "accuracy" which you already mentioned and a few other things like awareness and so on... you can change all these variables of course but to teach critters or bots truly "new tricks", more script is required.
Difficulty -does- affect bots too but mostly on a very subtle level so that you can safely say it is not really meant to affect them. For example, on easy difficulty, bot footsteps are louder!
There are more settings for both critters and bots that sum up the total "skill" of either though, "accuracy" which you already mentioned and a few other things like awareness and so on... you can change all these variables of course but to teach critters or bots truly "new tricks", more script is required.
Difficulty -does- affect bots too but mostly on a very subtle level so that you can safely say it is not really meant to affect them. For example, on easy difficulty, bot footsteps are louder!
Last edited by TCP_Wolf on Fri Aug 03, 2007 11:21 am, edited 1 time in total.
-=]HONESTY PAYS[=-
-
[]KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
Re: ?difficulty=...
even when the difficulty is set to 255, you can still dodge a skaarjs projectiles .. or anythings projectiles with ease, perhaps an increased projectile speed/momentumtransfer would help?
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
I hate to put a dampener on this but, I'd advise against it.
Filters are involved with the mapping which says which pawn is relevant to the game and which one may or may not be spawned.
eg a mapper sets a skaarjscout to spawn in one position if difficulty =1 or 2 but if difffiulty is 3 or 4 he has a skaarjlord to spawn at the same position (making it harder)
If you add an extra setting it would, if set to true spawn both skaarj in the same spot, and if set to false would spawn neither.
Which would require a map fix to solve the problem.
The current monsters are also clamped at skill 3 so they cant be spawned with higher skills unless theres script changes.
Aim error is also calculated with this in mind ( a skill no higher than 3)
The only real way to change it via script would be to make it so theres a greater variation between the skills and still use 4 game settings making the hardest mosters really hard, but my experiece with this is that players like to blow monsters up where the dont always need 5000 rounds to do it,
The alternative to that is to have a extra setting where skill could say be chosen from, 1 to 6 seperate from the difficulty settings, but then all this really does is add higher settings to the monsters (faster, more health and perhaps faster projectile speed for examples) and will also require the game types to stop setting their skills via difficulty.
Harder monsters can already be done via the various game types and mutators already floating around.
So to be honest I think the proper way to do this is to edit the maps themselves adding more monsters making use of the filters so harder settings have more monsters in the level, and to increase the amount of challenges rather than having super fast mosters with a lot of health
The creature factories etc could also have more etc etc etc
There are some good quality mappers still in the community that could easily do this ( I could name 4 without even trying to think hard) and if there was enough interest they could each be given several maps each asking to add extra monsters for the harder settings "only" and perhaps make the challenges themselves more difficult and or adding more creature factories in places in the maps where there arent already.
Some of the maps barely have a monster in it and pathing needs to be improved.
Just my 2 cents worth
cheers
Filters are involved with the mapping which says which pawn is relevant to the game and which one may or may not be spawned.
eg a mapper sets a skaarjscout to spawn in one position if difficulty =1 or 2 but if difffiulty is 3 or 4 he has a skaarjlord to spawn at the same position (making it harder)
If you add an extra setting it would, if set to true spawn both skaarj in the same spot, and if set to false would spawn neither.
Which would require a map fix to solve the problem.
The current monsters are also clamped at skill 3 so they cant be spawned with higher skills unless theres script changes.
Aim error is also calculated with this in mind ( a skill no higher than 3)
The only real way to change it via script would be to make it so theres a greater variation between the skills and still use 4 game settings making the hardest mosters really hard, but my experiece with this is that players like to blow monsters up where the dont always need 5000 rounds to do it,
The alternative to that is to have a extra setting where skill could say be chosen from, 1 to 6 seperate from the difficulty settings, but then all this really does is add higher settings to the monsters (faster, more health and perhaps faster projectile speed for examples) and will also require the game types to stop setting their skills via difficulty.
Harder monsters can already be done via the various game types and mutators already floating around.
So to be honest I think the proper way to do this is to edit the maps themselves adding more monsters making use of the filters so harder settings have more monsters in the level, and to increase the amount of challenges rather than having super fast mosters with a lot of health
The creature factories etc could also have more etc etc etc
There are some good quality mappers still in the community that could easily do this ( I could name 4 without even trying to think hard) and if there was enough interest they could each be given several maps each asking to add extra monsters for the harder settings "only" and perhaps make the challenges themselves more difficult and or adding more creature factories in places in the maps where there arent already.
Some of the maps barely have a monster in it and pathing needs to be improved.
Just my 2 cents worth
cheers
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: ?difficulty=...
Gameinfo.uc (or some subclass somewhere):
Problem with relevance solved, while still allowing additional difficulties. Of course, you could just edit IsRelevant to spawn the bDifficulty3 actor is difficulty >= 3 instead of == 3. No sense in going around and editing however many megabytes of maps when it can be done in ~2kb of UScript, especially when editing maps wouldn't allow improved AI without making a whole new set of scriptedpawns.
Code: Select all
event InitGame( string Options, out string Error )
{
.
. (Insert difficulty-reading code here)
.
if (difficulty > 3)
{difficulty=3; bSuperToughEnemiesEtc = true;}
.
.
.
}Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
Well its still not going to allow a (new) bDifficulty4 filter, which would break backwards compatiability anyway as would a global variable SuperToughEnemiesEtc.
Probablly the work around would be to store the difficulty in a tempory int in IsRelevant then reset the difficulty to a max of 4 (if higher), allow the checks and then reset the difficulty back to the tempory int value and hope mods call the super if they over write.
Also theres not a lot to gain from doing this If I put a 5k mutator on my site that adds a extra 50 groundspeed, and an extra 50 projectile speed to skill 3 monsters and I placed a 30 meg map pack that has the original maps with more monsters, more challenges and better pathing I know which one would get the most hits. So I guess its what the best result would be, not so much the download size.
The scriptedpawns still need to be partially recoded either way for bug fixes. The skill advatage would be minimal for example you cant get better tha 100% accuracy. Things like added projectile speed could be added but then is this is a modded ver of Unreal? Things like that really need consideration as theres no real turning back and some people just dont like changes to their beloved game
I dont mind either way, change or not
Probablly a poll in a few forums would be the best way to go
cheers
Probablly the work around would be to store the difficulty in a tempory int in IsRelevant then reset the difficulty to a max of 4 (if higher), allow the checks and then reset the difficulty back to the tempory int value and hope mods call the super if they over write.
Also theres not a lot to gain from doing this If I put a 5k mutator on my site that adds a extra 50 groundspeed, and an extra 50 projectile speed to skill 3 monsters and I placed a 30 meg map pack that has the original maps with more monsters, more challenges and better pathing I know which one would get the most hits. So I guess its what the best result would be, not so much the download size.
The scriptedpawns still need to be partially recoded either way for bug fixes. The skill advatage would be minimal for example you cant get better tha 100% accuracy. Things like added projectile speed could be added but then is this is a modded ver of Unreal? Things like that really need consideration as theres no real turning back and some people just dont like changes to their beloved game
I dont mind either way, change or not
Probablly a poll in a few forums would be the best way to go
cheers
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
The simplest solution would be to just to drop the skill 0 and replace it with skill 4 So that skill equals difficulty plus 1
Which means easy is now medium, medium in now hard, hard is now Ureal and Unreal is now super Unreal and only requires some minor tweaks in the scriptedpawn a nowhere else.
cheers
Which means easy is now medium, medium in now hard, hard is now Ureal and Unreal is now super Unreal and only requires some minor tweaks in the scriptedpawn a nowhere else.
cheers
-
DieHard SCWS
- Global Moderator
- Posts: 2064
- Joined: Sun Mar 16, 2003 11:33 pm
Re: ?difficulty=...
I am not getting in the actual discussion, i never really played Single Player. But i would think to leave the original menu and add an extra to it like: Uber Unreal ;)
.
.
.
.
.
.
DìèHárd»§ÇW§ http://www.celticwarriors.net and http://www.unrealtexture.com
-
Turboman.
- OldUnreal Member
- Posts: 898
- Joined: Tue Feb 04, 2003 6:40 pm
Re: ?difficulty=...
i can see the problem asgard mentioned: unreal, and the maps have 4 difficulty filters specified, if you add an extra it could severely mess up any map that is filter dependant, unless you go around modifying every unreal map (including the custom ones), breaking backward compatibility in the process.
i'm also kinda worried about hacking in extra pawns/less ammo by means of a mutator or whatever, how would this result in standard/custom maps? imagine if a pawn or pickup item is set to execute a scripted sequence, and that actor is duplicated several times (or removed and replaced by a different one), this could break maps completely.
i'd say the best way to make the game more difficult is to make the enemies smarter instead of altering map specific actors, make it so enemies can actually recognise and dodge projectiles like the flakshell, make them search for cover and coordinate their attacks in teams and such. improve vulnerability against hitscan weapons like rifles
i'm also kinda worried about hacking in extra pawns/less ammo by means of a mutator or whatever, how would this result in standard/custom maps? imagine if a pawn or pickup item is set to execute a scripted sequence, and that actor is duplicated several times (or removed and replaced by a different one), this could break maps completely.
i'd say the best way to make the game more difficult is to make the enemies smarter instead of altering map specific actors, make it so enemies can actually recognise and dodge projectiles like the flakshell, make them search for cover and coordinate their attacks in teams and such. improve vulnerability against hitscan weapons like rifles
Last edited by Turboman. on Tue Aug 14, 2007 11:53 pm, edited 1 time in total.
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
The filters could be gotten around so there is only 4, but dunno if this is the best way to go as its still dependant on isrelevant and some mods still may change that.
The mutator could be loaded or not and could be menu driven but doesnt add any new AI. Theres other mods that do this ayway.
The projectile speed is a good idea but then that depends on the projectile itself whether its speed is set by the pawn.
Some monsters tweak this already by skill.
Any major changes to the AI really require non downards compat with earlier vers as new functions, variables and perhaps states need to be added. And then the new AI might not be liked by all.
Having said that some tweaks could be made to things like state Acquisition, to send pawns to attacking instead of standing by like a dumb ass while their friend dies, Projectile speed improvement, maybe Skill = skill plus 1 with extra groundspeed to a max no higher than skill 3's speed.
The monsters can already fight as a team but the mapper has to set it, the Acquisition thing should help a litte.
I still think the best way is to edit the maps and add more mosters but then that makes them non backward compat awell. The above should make them slightly more difficult without changing gameplay too much.
The mutator could be loaded or not and could be menu driven but doesnt add any new AI. Theres other mods that do this ayway.
The projectile speed is a good idea but then that depends on the projectile itself whether its speed is set by the pawn.
Some monsters tweak this already by skill.
Any major changes to the AI really require non downards compat with earlier vers as new functions, variables and perhaps states need to be added. And then the new AI might not be liked by all.
Having said that some tweaks could be made to things like state Acquisition, to send pawns to attacking instead of standing by like a dumb ass while their friend dies, Projectile speed improvement, maybe Skill = skill plus 1 with extra groundspeed to a max no higher than skill 3's speed.
The monsters can already fight as a team but the mapper has to set it, the Acquisition thing should help a litte.
I still think the best way is to edit the maps and add more mosters but then that makes them non backward compat awell. The above should make them slightly more difficult without changing gameplay too much.
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
Ok There is already 255 difficulty levels..
The reason you dont notice is because the pawns skill setting is clamped at 3
I thought that difficulty was also clamped somewhere to a max of 3, but it isnt.
in other words you can add difficulty=12 to the console command and the level will be difficulty 12
What this means is that pawns will have a skill of 3 BUT!! Unreal will spawn every monster available, all the filtered ones aswell.
In effect there already is a difficulty=4 setting
Now this might sound cool but it isnt With all the problems associatrd with collision it may lead to crashes. Filtered pawns may occupy the same space (location). And may even have the same tags and try to cause the same event.
I cant find anywhere in the standard maps where this is a problem as they "seem" to place their filtered pawns in different locations
eg a pawn that ONLY exists in difficulty 3 isnt placed over a pawn that ONLY exists in difficulty 2. So if difficulty 4 spawns both pawns they dont overlap.
However I have seen in custom maps where there are 2 filtered pawns occupying the same space in many places. I still have the map/maps and its not to say this wont happen over and over again
Really this should be addressed in GameInfo's IsRelevant.
one fix is to add this to the top of the fuction
FClamp(difficulty, 0, 3);
Which results in a max of difficulty 3
Or the prefered method
Is to change this line
|| (Difficulty==3 && !Other.bDifficulty3 )
to this
|| (Difficulty>=3 && !Other.bDifficulty3 )
Which allows higher difficulty settings
Which will allow monsters and bots to given better settings independant of their skill via difficulty
Example only- not recommended
if(Level.Game.difficulty > 3)
health += 50 *( difficulty-3);
more settigs etc etc
So I guess a couple of extra difficulties could be added, if wanted
cheers
The reason you dont notice is because the pawns skill setting is clamped at 3
I thought that difficulty was also clamped somewhere to a max of 3, but it isnt.
in other words you can add difficulty=12 to the console command and the level will be difficulty 12
What this means is that pawns will have a skill of 3 BUT!! Unreal will spawn every monster available, all the filtered ones aswell.
In effect there already is a difficulty=4 setting
Now this might sound cool but it isnt With all the problems associatrd with collision it may lead to crashes. Filtered pawns may occupy the same space (location). And may even have the same tags and try to cause the same event.
I cant find anywhere in the standard maps where this is a problem as they "seem" to place their filtered pawns in different locations
eg a pawn that ONLY exists in difficulty 3 isnt placed over a pawn that ONLY exists in difficulty 2. So if difficulty 4 spawns both pawns they dont overlap.
However I have seen in custom maps where there are 2 filtered pawns occupying the same space in many places. I still have the map/maps and its not to say this wont happen over and over again
Really this should be addressed in GameInfo's IsRelevant.
one fix is to add this to the top of the fuction
FClamp(difficulty, 0, 3);
Which results in a max of difficulty 3
Or the prefered method
Is to change this line
|| (Difficulty==3 && !Other.bDifficulty3 )
to this
|| (Difficulty>=3 && !Other.bDifficulty3 )
Which allows higher difficulty settings
Which will allow monsters and bots to given better settings independant of their skill via difficulty
Example only- not recommended
if(Level.Game.difficulty > 3)
health += 50 *( difficulty-3);
more settigs etc etc
So I guess a couple of extra difficulties could be added, if wanted
cheers
-
asgard12000
- OldUnreal Member
- Posts: 254
- Joined: Mon Aug 15, 2005 2:46 pm
Re: ?difficulty=...
On second thought, its probably better to leave IsRelevant as it is, and mappers to note not to place filtered pawns on top of each other. Otherwise some mosters and pickups may get filtered out, which are really needed if its to be more difficult.
Anyway Ive put together a few examples which will work in difficulty= 4, 5 and 6 Including a bot
eg
switchcooplevel Nyleve?difficulty=4
switchcooplevel Nyleve?difficulty=6
They arent super mosters, just slight harder
You can dowload from
http://www.angelfire.com/empire/napali/
named skaarjtest at the top of the main page
contains a skaarj, skaarjsniper, warlord, brute, titan and a bot
example script
Can someone who plays DM try the bot please.
Cheers
Anyway Ive put together a few examples which will work in difficulty= 4, 5 and 6 Including a bot
eg
switchcooplevel Nyleve?difficulty=4
switchcooplevel Nyleve?difficulty=6
They arent super mosters, just slight harder
You can dowload from
http://www.angelfire.com/empire/napali/
named skaarjtest at the top of the main page
contains a skaarj, skaarjsniper, warlord, brute, titan and a bot
example script
Code: Select all
class skaarjtest extends skaarjwarrior;
function PreBeginPlay() // to be added yo scriptedpawns PreBeginPlay
{ // and removed from here
local float modifier;
local int newskill;
super.PreBeginPlay();
newskill= FClamp(Level.Game.difficulty-3, 1, 3);
modifier = 1+ (0.1*newskill);
if(Level.Game.difficulty > 3)
{
health *= modifier;
SightRadius*= modifier;
projectileSpeed *= modifier;
RotationRate.Yaw *= modifier;
groundspeed *= modifier;
waterspeed *= modifier;
airspeed *= modifier;
AccelRate *= modifier;
}
}
function PostBeginPlay()
{
local float modifier;
local int newskill;
Super.PostBeginPlay();
newskill= FClamp(Level.Game.difficulty-3, 1, 3);
modifier = 1+ (0.2*newskill);
if(Level.Game.difficulty > 3) //skaarj only stuff
{
SpinDamage *= modifier;
ClawDamage *= modifier;
LungeDamage *= modifier;
}
}
function rotator AdjustAim(float projSpeed, vector projStart, int aimerror, bool leadTarget, bool warnTarget)
{
local rotator FireRotation;
local vector FireSpot;
local actor HitActor;
local vector HitLocation, HitNormal;
local int modifier;
if ( Target == None )
Target = Enemy;
if ( Target == None )
return Rotation;
if ( !Target.IsA('Pawn') )
return rotator(Target.Location - Location);
FireSpot = Target.Location;
aimerror = aimerror * (1 - 10 *
((Normal(Target.Location - Location)
Dot Normal((Target.Location + 0.5 * Target.Velocity) - (Location + 0.5 * Velocity))) - 1));
aimerror = aimerror * (2.4 - 0.5 * (skill + FRand()));
modifier = FClamp(Level.Game.difficulty-3, 1, 3);
if(Level.Game.difficulty > 3)
aimerror *= 1-(0.3*modifier);
if (leadTarget && (projSpeed > 0))
{
FireSpot += FMin(1, 0.7 + 0.6 * FRand()) * (Target.Velocity * VSize(Target.Location - ProjStart)/projSpeed);
HitActor = Trace(HitLocation, HitNormal, FireSpot, ProjStart, false);
if (HitActor != None)
FireSpot = 0.5 * (FireSpot + Target.Location);
}
HitActor = self; //so will fail first check unless shooting at feet
if ( bIsPlayer && (Location.Z + 19 >= Target.Location.Z) && Target.IsA('Pawn')
&& (Weapon != None) && Weapon.bSplashDamage && (0.5 * (skill - 1) > FRand()) )
{
// Try to aim at feet
HitActor = Trace(HitLocation, HitNormal, FireSpot - vect(0,0,80), FireSpot, false);
if ( HitActor != None )
{
FireSpot = HitLocation + vect(0,0,3);
HitActor = Trace(HitLocation, HitNormal, FireSpot, ProjStart, false);
}
else
HitActor = self;
}
if ( HitActor != None )
{
//try middle
FireSpot.Z = Target.Location.Z;
HitActor = Trace(HitLocation, HitNormal, FireSpot, ProjStart, false);
}
if( HitActor != None )
{
////try head
FireSpot.Z = Target.Location.Z + 0.9 * Target.CollisionHeight;
HitActor = Trace(HitLocation, HitNormal, FireSpot, ProjStart, false);
}
if ( (HitActor != None) && (Target == Enemy) )
{
FireSpot = LastSeenPos;
if ( Location.Z >= LastSeenPos.Z )
FireSpot.Z -= 0.5 * Enemy.CollisionHeight;
if ( Weapon != None )
{
HitActor = Trace(HitLocation, HitNormal, FireSpot, ProjStart, false);
if ( HitActor != None )
{
bFire = 0;
bAltFire = 0;
SetTimer(TimeBetweenAttacks, false);
}
}
}
FireRotation = Rotator(FireSpot - ProjStart);
FireRotation.Yaw = FireRotation.Yaw + 0.5 * (Rand(2 * aimerror) - aimerror);
if (warnTarget && Pawn(Target) != None)
Pawn(Target).WarnTarget(self, projSpeed, vector(FireRotation));
FireRotation.Yaw = FireRotation.Yaw & 65535;
if ( (Abs(FireRotation.Yaw - (Rotation.Yaw & 65535)) > 8192)
&& (Abs(FireRotation.Yaw - (Rotation.Yaw & 65535)) < 57343) )
{
if ( (FireRotation.Yaw > Rotation.Yaw + 32768) ||
((FireRotation.Yaw < Rotation.Yaw) && (FireRotation.Yaw > Rotation.Yaw - 32768)) )
FireRotation.Yaw = Rotation.Yaw - 8192;
else
FireRotation.Yaw = Rotation.Yaw + 8192;
}
viewRotation = FireRotation;
return FireRotation;
}
defaultproperties
{
RangedProjectile=Class'SkaarjTestProj'
}
Code: Select all
class SkaarjTestProj extends SkaarjProjectile;
auto state Flying
{
function BeginState()
{
if ( ScriptedPawn(Instigator) != None )
{
Speed = ScriptedPawn(Instigator).ProjectileSpeed;
if(maxspeed < Speed)
maxspeed=Speed;
}
Velocity = Vector(Rotation) * speed;
PlaySound(SpawnSound);
SetTimer(0.20,False);
}
Begin:
Sleep(7.0); //self destruct after 7.0 seconds
Explode(Location, vect(0,0,0));
}
Cheers
