free aim not work in UDK-2010-05
free aim not work in UDK-2010-05
Yeah I'm having problems with changing the direction the player is looking in the last 3 camera modes. Any suggestions?
Thanks
Thanks for the script dean it's working like a charm apart from one snag - I have matinee sequences where before it cut to a different camera for cutscenes and such - this script seems to have disabled that ??? Have you encoutered this - do you know of any workarounds?
Also is there a way to make the camera focus on the crosshair rather than the pawn (player)?
I understand I should be learning the code for myself but am primarily a modeler/texture artist and was hoping for a helping hand in completing my first project.
Your help is much appreciated - feel free to PM me - Many thanks
Last edited by heroicsatsuma; 06-03-2010 at 05:50 PM.
Everything about art and level design in UDK, from sketch to the game.
http://artandleveldesign.blogspot.com/
hello
my weapons dont show in anything but 1st person cam since i changed my character, it was ok with the default udk character
please could you explain how to get them to show?
or better still post the code
im starting to delve into the script now but im still at the bottom of the curve atm
thanks
Please ask questions in the forum, NOT a private messageCode:We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
tegleg.co.uk
My Tutorials n Stuff
Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
will code for money
in UKD 2010-04 I got an error "Couldn't spawn player:Engine.GameMessage.FailedSpawnMessage"
Why?
Last edited by jakoks; 06-26-2010 at 02:59 PM.
@jakoks:
Is there a PlayerStart actor in your map?
Hey guys,
I managed to clear the code of everything i dont need. ( i just wanted the CameraZoom 2 in fact)
I get everything running
BUT
The weapon always shoot toward a point in the middle of the ceiling. I think it must be in that portion of the code:
**Editfunction Rotator GetAdjustedAimFor(Weapon W, vector StartFireLoc)
{ // This makes our gunfire hit our target location, NOT where the pawn or weapon is aimed.
if (CameraZoom != 1) //if not in first person mode
{
if(Pawn != None)
{
return rotator(MouseHitWorldLocation - startfireloc); // find the rotation from the weapon's barrel to the target.
}
else return Rotation;
} //if (CameraZoom !=1)
else //if not in first person mode, run regular UT script
return super.GetAdjustedAimFor(W,StartFireLoc);
I got it, i changed
So that it passes in the false every time. I just need to make it a little more precise now.if (CameraZoom != 1)
to
if (CameraZoom == 1)
Thanks!
Last edited by MaxAttack; 07-24-2010 at 07:23 PM.
How can i make sure that the pawn shoots where the crosshair is? should i write another code or can i just modify the regular UT script?
@Jakoks I had that same problem, if you got warnings on line 8,9, and 11 in DSGameInfo and warnings on 370 in DSPlayerController. You need to change the code to make sure that it's checking in your folder for the scripts.
Code://parts to change in DSGameInfo PlayerControllerClass=class'Yourgamesfolder.DSPlayerController' DefaultPawnClass=class'Yourgamesfolder.DSPawn' HUDType=class'Yourgamesfolder.DSHUD' //Link to my HUD //parts to change in DSPlayerController InputClass=class'Yourgamesfolder.DSPlayerInput'
Hello, there. I've followed this tutorial and it worked out pretty well.
However, when I tried loading the gamemode for multiplayer the following issue occurs:
- clients only see their weapons;
- moving the mouse only makes the weapon change it's pitch;
Also not that clients can see the player models for others while ingame.
If anyone has an idea about why it might be happening, I would appreciate a reply.
First of this post has been a great help for me to get started with udk scripting. But i have a problem with the AdjustedAim. My camera is setup as a sideview (sidescroller). But i cant figure out how to get this to work in only 2 dimensions (right now it shoots at the wall behind the player and i want it to shoot horizontal)
^- what im currently using to get the pawn to look at the cursor/shoot at the cursorfunction UpdateRotation( float DeltaTime )
{
local Rotator newRotation;
local DemoGamePawn ThePawn; // Typecast the Pawn
local vector mousePositiontemp;
ThePawn = DemoGamePawn(Pawn); // Typecast the Pawn
mousePositiontemp = MouseHitWorldLocation;
mousePositiontemp.Y = Pawn.Location.Y;
NewRotation = rotator(mousePositiontemp - Pawn.Location);
ThePawn.AimNode.Aim=vect2d(0.0, NewRotation.Pitch*0.00006);
if ( Pawn != None )
Pawn.FaceRotation(NewRotation, deltatime);
}
function Rotator GetAdjustedAimFor(Weapon W, vector StartFireLoc)
{ // This makes our gunfire hit our target location, NOT where the pawn or weapon is aimed.
if(Pawn != None)
{
return rotator(MouseHitWorldLocation - startfireloc); // find the rotation from the weapon's barrel to the target.
}
else return Rotation;
}
It's shooting at the wall behind the player because the MouseHitWorldLocation points there. You should try to do the same thing you did in UpdateRotation. See the quote:
function Rotator GetAdjustedAimFor(Weapon W, vector StartFireLoc)
{ // This makes our gunfire hit our target location, NOT where the pawn or weapon is aimed.
local vector mouserot; //new mouse location vector
if(Pawn != None)
{
mouserot=MouseHitWorldLocation; //get the mouse position
mouserot.Y=Pawn.Location.Y; //set the Y value to the pawn's
return rotator(mouserot - startfireloc); // find the rotation from the weapon's barrel to the target.
}
else return Rotation;
}
Thank you, I appreciate your fantastic post!
I really needed the function like your MMCamRotate!
But I have some problems
I tried your classes in August build of UDK.
But It looks weird.
While in 3rd person mode(CameraZoom>=2), My character always fires at a particular position on the floor.
You intended for the character to fire at the position where the camera is looking at, didn't you?
I'll be most gratefull for your answeres![]()
move your mouse round to fire at things in that camera mode
Please ask questions in the forum, NOT a private messageCode:We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
tegleg.co.uk
My Tutorials n Stuff
Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
will code for money
I am a student game designer and I would like to learn UnrealScript for my final year project. I am trying to use this tutorial as a springboard to understand it, yet I cannot make it work. I follow the steps, have made the changes in
DefaultEngine.ini
+ModEditPackages=DSGame
and
DefaultGame.ini
DefaultGame=DSGame.DSGameInfo
DefaultServerGame=DSGame.DSGameInfo
PlayerControllerClassName=DSGame.DSPlayerControlle r
yet when I start it in the editor, I just get the default game settings, FPS and the mouse wheel does not change cameras. I have tried a couple of other tutorials that extend from GameInfo instead of UTGame (eg. http://forums.epicgames.com/showthread.php?t=726985) and they work, yet they lack the features of this one and I do not have enough experience to make them by my self in this point.
I have not made the connection of the middle key yet in DefaultInput, but from what I see camera changes are made by subverting the exec function PrevWeapon() and exec function NextWeapon(), so it should not influence the outcome.
I am running the August version of UDK. Any help would be most welcome.
I think the problem is that in the latest version of UDK, the code becomes...messed up to say the least. In the previous versions i had it working just fine; ported it o the latest version, and only the first person camera works the way its supposed to...this means either giving the code a good look over and making the necessary changes (of which i have no idea), using an older version of UDK, or doing without a thrid person camera...
I want to get a vending machine with fun sized candy bars, but the glass in front would be a magnifying glass. You'll be mad, but it will be too late.
Hi there !
I'm new in scripting and I am trying to use this tutorial but I got these 2 errors on compiling :
C:\UDK\UDK-2011-01\Development\Src\GolfGame\Classes\GolfGameHUD.uc (74) : Error, Unknown Function 'GetCursorPosition' in 'Class Engine.UIRoot'
C:\UDK\UDK-2011-01\Development\Src\GolfGame\Classes\GolfGameHUD.uc (40) : Error, Unrecognized member 'SetMousePosition' in class 'GameUISceneClient'
Can anyone help me with these errors ?
thanks !
line74 class'UIRoot'.static.GetCursorPosition(ScreenPos.X , ScreenPos.Y);
line40 PlayerOwner.GetUIController().SceneClient.SetMouse Position(PC.resolution.x/2,PC.resolution.y/2);
I am receiving the same errors, I am very new to unreal script and wanted to manipulate the camera. Please let me know what I can do to fix this.
G:\UDK\Development\Src\MyProject\Classes\DSHUD.uc( 65,0): error : Unknown Function 'GetCursorPosition' in 'Class Engine.UIRoot'
G:\UDK\Development\Src\MyProject\Classes\DSHUD.uc( 31,0): error : Unrecognized member 'SetMousePosition' in class 'GameUISceneClient
Click "Documentation" search it for Camera stuff, rather than digging up code that is for relatively ancient versions of the engine![]()
http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com
- Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks
Thanks Blade !
Sorry for 'buzzing' you. I'm not good at scripting, any info are welcome.
I'll try on Programming zone.
I noticed that the character is not following where the camera is looking. Does anyone know why that is?
I have the same errors as well.
How to fix it? Please help.
Thanks.
Last edited by adamboho; 01-21-2012 at 04:54 PM.
the problem with this excelent script is that in later versions of udk they removed or changed the mouse cursor stuff.
there is an example of a mouse interface on here somewhere.
a possible fix would be to integrate the 2 so it takes the mouse position from the mouse interface part.
Please ask questions in the forum, NOT a private messageCode:We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
tegleg.co.uk
My Tutorials n Stuff
Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
will code for money
Bookmarks