Birds fly. Sun shines. And brother? Brutes shoot people.

UScript: Chat, Questions, Discussion

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1195
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 13 Feb 2014, 15:03

I have greyscale versions of some of the green fonts in the game, but they aren't recognized when I try to reference them.

I import them like this:

Code: Select all

#exec Font Import File=Textures\SCLargeFont.pcx Name=SCLargeFont PACKAGE=SkCampMeshes


Code: Select all

Canvas.Font = Font'SkCampMeshes.SCLargeFont';

But when I do this in a custom HUD class, no text appears. Switching the font back to one of the normal fonts works, though.

User avatar jaypeezy
Skaarj Berserker Skaarj Berserker
Posts: 326
Joined: 25 Sep 2010, 04:32

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 27 Feb 2014, 19:35

I have a general, conceptual question.

I've created a barrel item for use in a map, where the goal is going to be defend the barrel from an onslaught of enemies.

Is it even possible to adjust the code for the custom barrel, in such a way that it will draw its current health above or near the barrel itself? I've seen stuff like scope zoom percentage, ammo etc. drawn to a players screen; what I want is something that's actually above the barrel itself. Would I have to create a new object for that to work, or can it all be a part of the decoration?

User avatar ebd
Trustee Member Trustee Member
Posts: 481
Joined: 05 Apr 2008, 19:08
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 27 Feb 2014, 21:53

jaypeezy wrote:I have a general, conceptual question.

I've created a barrel item for use in a map, where the goal is going to be defend the barrel from an onslaught of enemies.

Is it even possible to adjust the code for the custom barrel, in such a way that it will draw its current health above or near the barrel itself? I've seen stuff like scope zoom percentage, ammo etc. drawn to a players screen; what I want is something that's actually above the barrel itself. Would I have to create a new object for that to work, or can it all be a part of the decoration?
The easiest way I'd imagine would be to create a second class, have an instanced spawned by the barrel in the barrel's postBeginPlay() and attach it to the barrel, with the barrel's destroy() also calling the second actor's destroy(). The second class' draw type could be a sprite with a scripted texture. So three classes total (barrel, barrel's health, a scripted texture)

User avatar Draco Nihil
Skaarj Lord Skaarj Lord
Posts: 197
Joined: 06 Jun 2012, 21:18
Location: Independence, Kansas
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 07 Apr 2014, 00:39

Well I have a predicament.

In Gunmetal, the engine noise your RPV generates (Stealth Chassis makes none, even when under turbo but I'm not recreating that particular RPV in Unreal for obvious reasons), the player never hears their own engine sound but other player's can, and vice versa.

How would I go about making my ambientsound None for the client but for everyone else it plays the engine noise, as to recreate the behavior described in Gunmetal?
“I am the dragon without a name...”

User avatar Buff Skeleton
>:E >:E
Posts: 4175
Joined: 15 Dec 2007, 00:46

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 07 Apr 2014, 04:13

You might be able to do that with bOwnerNoSee in Advanced but I don't know if that will work for sounds or just visually.
Image

User avatar Draco Nihil
Skaarj Lord Skaarj Lord
Posts: 197
Joined: 06 Jun 2012, 21:18
Location: Independence, Kansas
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 10 Apr 2014, 19:51

Well, I managed to get it to work by abusing clientside execution. Now I just have to figure out how to replicate the rolling Gunmetal does when you strafe or turn your RPV. I know Unreal likes to do this "fun" thing where you "weave" left and right during turns while running, and the only way to turn this off is to set your RotationRate.Roll to 1 (if you EVER set it to 0 then Roll cannot happen *AT ALL*)

EDIT: Wait then I realize the way player rotation is replicated, the roll is significantly quantized. I suppose I wouldn't mind the serious jerkiness but perhaps there's a way to clientside simulate the weaving as I turn and strafe?
“I am the dragon without a name...”

xRedStar
Skaarj Assassin Skaarj Assassin
Posts: 123
Joined: 13 Jan 2013, 18:56

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 15 Apr 2014, 21:58

Guys I need help finishing a mod, I am almost done. I have asked this a couple times but no one has really helped much, but it is a complicated issue. The mod I am finishing is a strafe jumping mod (title to be determined). It simulates strafe jumping type physics similar to Quake Live Air Control strafe physics. My goal is to make the player move faster based on whether or not his mouse is moving in the same direction as his strafe directions. This means that I need to monitor the direction the player moves, left... right... forward... backward. But I need a way to do this, and I still don't know how I could.

So far I have created a basic angle measurement function that creates and conditions an angle between where his mouse is at when he jumps and lands. Creating temporary groundspeed increments while he keeps jumping. However like I said, this is a very basic bunny hop meaning he doesn't have to strafe in any particular direction as long as his mouse moves. There is full air control meaning he can turn while in the air and can speed up even more. Anyone who wants to help me finish this thing, just PM me :)

Bleeder91<NL>
Skaarj Assassin Skaarj Assassin
Posts: 147
Joined: 24 Jun 2011, 18:45

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 16 Apr 2014, 20:22

Code: Select all

FixDir = (rotator(velocity)-Rotation).Yaw & 65535;
if(FixDir>57343||FixDir<8191) //Is running forward
else if(FixDir<24575) //Is running to the right
else if(FixDir<40959) //Is running backwards
else //Is running to the left

That's ripped from the Scriptedpawn's NeedToTurn() code that checks whether it has to rotate to face the enemy. What you want from it is the left and right part:

Code: Select all

FixDir = (rotator(velocity)-Rotation).Yaw & 65535;
if(FixDir>8191 && FixDir<24575) //Is running to the right
else if(FixDir>40959 && FixDir<57343) //Is running to the left


Here's an example that can double the groundspeed based on how much much to the left/right someone is looking:

Code: Select all

FixDir = (rotator(velocity)-Rotation).Yaw & 65535;
if(FixDir>8191 && FixDir<24575) GroundSpeed=Default.GroundSpeed*(1.0+(FixDir-8191)/16384);
else if(FixDir>40959 && FixDir<57343) GroundSpeed=Default.GroundSpeed*(1.0+(FixDir-40959)/16384);

Hope that works/helped you out.

xRedStar
Skaarj Assassin Skaarj Assassin
Posts: 123
Joined: 13 Jan 2013, 18:56

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 16 Apr 2014, 21:19

Pretty quick working code even from scratch, however it only works half way. If you move left while turning the mouse left... you can move forward quicker... but if you move right you can only move backwards quicker. I can see what you did there though, and I tried to doing 8191(Forward) and 57343(Right) instead and it didn't work either. I suppose you've got something going here though... maybe it just needs some work unsure. But anyways thanks for supplying me with a small formula as I haven't found any variables or case statements that show player strafe directions.

xRedStar
Skaarj Assassin Skaarj Assassin
Posts: 123
Joined: 13 Jan 2013, 18:56

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 16 Apr 2014, 21:54

So I logged FixDir in the game to see what the values were, and I got 65535 for moving forward(The correct value) but everything else was very different... perhaps this is why I am getting wrong results??? Anyways I tried modifying the code some with the results I got and it didn't even do anything... maybe it is logging the wrong numbers. Idk exactly what I am looking at right now, but I am certain that 65535 is forward. I don't exactly understand whats up :\

I also tried your code you gave to me, which worked but like I said in the reply above... it works in a strange way.

Bleeder91<NL>
Skaarj Assassin Skaarj Assassin
Posts: 147
Joined: 24 Jun 2011, 18:45

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 16 Apr 2014, 22:25

Mye it takes some trial and error to get the values right. Every 16384 is a 90 degree angle, clockwise, starting with 0 as straight ahead, 16383 as right, etc. As far as i can remember, no time to check XD

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1195
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 15 May 2014, 15:50

Why is it that some guns will animate correctly one dedicated servers, but others don't? The automag and minigun animations work with both firing modes, but only the stinger's alt fire works (at least in 227).

I'm having similar problems with my razik. Its primary fire animation works online, although it's somewhat stiff compared to in single player. The secondary fire animations won't work if the same animation is played more than once in a row (it randomly plays one of four claw animations), but they work if different animations are played.

User avatar Buff Skeleton
>:E >:E
Posts: 4175
Joined: 15 Dec 2007, 00:46

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 15 May 2014, 19:26

I've seen the same thing with weapons that use the same model, even. The Shock Rifle animates perfectly fine, but the Tachyon Driver does not at times, even with the same exact animation settings. Shit is weird.
Image

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1195
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 30 May 2014, 18:03

I'm no closer to fixing the problem, but I found something that's sort of intersting. I have the dual-wielded raziks working in game. Instead of doing something similar to the dual-wielded enforcers, I have the raziks be parts of the same model. Currently, the right-hand razik has the same claw animations as before, and the left-hand one has mirrored versions of those animations.

What's interesting is that even though I coded the PlayAltFiring function to never play the same animation twice in a row, the freezing problem still happens if the right and left-hand animations are mirrors of each other. For example, if the razik plays Claw1 and then Claw5 (which is the left-handed version of Claw1), the Claw5 animation will freeze. I wonder if this has something to do with the animation rates, since the only claw animations that have the same rates are the ones that are mirrors of each other.

User avatar []KAOS[]Casey
Skaarj Berserker Skaarj Berserker
Posts: 426
Joined: 25 Sep 2008, 07:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 31 May 2014, 04:26

Just FYI, some animations may appear to not work to yourself(behindview 1) online. iirc there are certain talking/idle/taunt animations of the such that don't work to you, but other people will see them. Try running a second client {rename your unreal/ut.exe} and connecting to a local server or what have you.

The question really is why it is happening, though. If you bullshit around with replication (roles, remoterole, etc) you can usually get it to work.. or break for other people who see you.

I'll look into the primary vs altfire on the Stinger since that's a good base to start off of. U1 is all server side animation calls, so it might be interesting to look at.

Previous Next

Who is online

Users browsing this forum: No registered users and 4 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited