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: 1178
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 07:14

Did you try it in MCoop, or did you use the custom gametype? I used normal MCoop and it worked without any problems.

Here's what my log shows:
[spoiler]

Code: Select all

ScriptLog: InitGame: ?Game=MCoop2.MCoopGame?Mutator=?Name=firedragon?Class=SM_Player.SM_Player?Skin=?Team=255?Face=
ScriptLog: Difficulty 1
ScriptLog: Remote Administration with Password
ScriptLog: Base Mutator is NyLeve.UMutator0
Log: Bound to MCoopMutator2.dll
Log: Loading: Package MCoopMutator2
Log: Loading: Package AKMCoopMutator2
Log: Loading: Package AKMCoop2
Log: Loading: Package p6mcoop
MCoop: ----------------------------------------------------------------------------------------------------------------------------
MCoop:     Game Mutator loaded..... MCoopMutator2.Coop
MCoop:     Commands Mutator loaded..... MCoopMutator2.MCoopCommands
MCoop:     Login Mutator loaded..... MCoopMutator2.CoopLoginMutator
MCoop:     Login Mutator loaded..... AKMCoopMutator2.AK2LoginMutator
MCoop:     Login Mutator loaded..... p6mcoop.p6loginmutator
MCoop:     Pawns list loaded..... MCoop2.PawnsList
MCoop:     Pawns list loaded..... AKMCoop2.AKPawnsList
MCoop:     Pawns list loaded..... MCBetaMonsters.BetaPawnsList
MCoop:     Pawns list loaded..... p6mcoop.p6PawnsList
MCoop: ----------------------------------------------------------------------------------------------------------------------------
MCoop: ***********************************************************************************************
MCoop:  MonsterCoop mod now running!
MCoop:  by Winged Unicorn - version 2.3
MCoop:  Thanks go to:
MCoop:  - UsAaR33, -=O-HbG-O=-, }TCP{Wolf, Boodaflow and Zombie ;)
MCoop:  A special thank to:
MCoop:  - Tammy, aka sniperwolf, and Zora :)
MCoop: ***********************************************************************************************
Log: Spawning new actor for Viewport WindowsViewport0
Log: Loading: Package SM_Player
Log: Loading: Package testpred
MCoop: ** Name: firedragon **
MCoop: ** Desired Class: SM_Player.SM_Player **
MCoop: ** Spawn Class: p6mcoop.mcoopFiredragon **
[/spoiler]

User avatar Jigoku
Skaarj Warlord Skaarj Warlord
Posts: 959
Joined: 03 Dec 2010, 00:51
Location: The Backrooms
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 07:21

You'd add the pawns to MCoop2.ini. Yeah the MCoop thing.
Trying to get back into the swing of things.

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 08:20

well it works now... Finally \o/

Apparently there was a huge difference between
p6mcoop.p6LoginMutator and p6Mcoop.p6LoginMutator
stopping the loginhandler from loading. Man that was such a pain. It should have taken 5 minutes and instead took 3 hours just to debug the mcoop issues.

I still suspect there is some sort of difference between our mcoop versions , but i cant see what , i know im running 2.3 full ( on 225)
ill probaly delete the custom gamtype (if possible) since it not needed, and seems to break something.

Thank you very much AlCapowned for your Patience and help.
Especially for pointing out and creating a loginmutator which was key to the problem.

if and when i finish the rest of this ( and some other very interesting others?)
I suppose mabye i shall send it your way since your interested in mcoop.
( you technically already have this now tho)

Im so tired im going to sleep now its middle of night.. so the rest of the pawn need to wait...

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

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 09:25

Weird. The only things case sensitive in loading in unreal are the names of .dll packages. if a class is created as MyPackage.MyActor and spawned {through a string cast} as mypackage.myactor it will fail to load.

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

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 15:23

At least you got it working. The little things like that always trick me, too.

Now that I know what to do, I'm going to work on RTNP pawns for MCoop.

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 02 Dec 2012, 20:01

ok guys im back for another question ,

is there any way to detect if a Player is on a mover?
It seems playerpawn.base isnt helping me much , and the check i need to preform needs to run during tick , so i cant really have any lopp-da-loops comparing mover distance or a hack like that...

User avatar Feralidragon
Skaarj Lord Skaarj Lord
Posts: 223
Joined: 15 Jul 2008, 22:41
Location: Liandri

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 02 Dec 2012, 20:34

If you're trying to detect if a player is standing in the top of a mover, the Base property should suffice (that's the sole reason that property even exists).
However if in your case that isn't working for some reason, you can always try to do a trace from the player to the place you expect to find the mover (the trace should return an actor, so you just need to check if it's a mover).

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 02 Dec 2012, 23:51

need to know 100% of time whether they are on top or "in".
I need to prevent a mod from saving a position if the player is in a "movable place" or "stuck" about every 3 - 6 seconds

it seems that base only indicates your on a mover if you literaly on a single edge , and not on the mover , IE a moving bridge wont register as a mover unless your on the top of the cables. witch is horribly pointless.

im using unreal1 , any chance a basic trace example could created / listed for me , i dont know much about trace stuff as i have never really needed it, if thats to much work , i can go look for one myself i guess ....I basicly need to know whats directly under the players collision , perferable as a simple callable function with a return of true/false or the trace hit actor.

User avatar Feralidragon
Skaarj Lord Skaarj Lord
Posts: 223
Joined: 15 Jul 2008, 22:41
Location: Liandri

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 03 Dec 2012, 00:33

Sure:

Code: Select all

function bool IsOnMover(Actor A)
{
local vector HitLoc, HitNorm;

   if (A == None)
      return False;
   return (Mover(A.Base) != None || Mover(A.Trace(HitLoc, HitNorm, A.Location - vect(0,0,1)*(A.CollisionHeight + 16.0), A.Location, True)) != None);
}


I didn't test it though, so let me know if it works or not.
The "16.0" is somewhat a error margin since when something is standing on the top of something else, there are precision errors which may make the player stand a bit higher than what it should in a mover or any other actor with collision.

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 03 Dec 2012, 02:43

ok that seems to work perfectly now, at least on the few movers that gave me trouble, what you gave me here was a huge help,
you basically just fixed a bug i have been having complaints about for over a year,
and made it so i can avoid about 2 dozen map fix workarounds I had to use before.
I am gonna have to play around a bit using what you gave me here for some other related stuff.Thanks Feralidragon !

User avatar Gizzy
Skaarj Berserker Skaarj Berserker
Posts: 450
Joined: 02 Feb 2010, 12:55

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 13 Dec 2012, 01:47

Could BeamEmitters be used for a lasersight on a gun? Would be an incredibly helpful alternative than hacking it onto the canvas so it doesnt lag online

Z-enzyme
White Tusk White Tusk
Posts: 2136
Joined: 13 Nov 2007, 20:01

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 13 Dec 2012, 20:36

Gizzy wrote:Could BeamEmitters be used for a lasersight on a gun? Would be an incredibly helpful alternative than hacking it onto the canvas so it doesnt lag online

Yes.

You set your beam emitter to shoot at a location which is given with a trace function. Then you stick it to a weapons' bone or vertex.

User avatar Gizzy
Skaarj Berserker Skaarj Berserker
Posts: 450
Joined: 02 Feb 2010, 12:55

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 27 Dec 2012, 19:49

Qtit wrote:
Gizzy wrote:Could BeamEmitters be used for a lasersight on a gun? Would be an incredibly helpful alternative than hacking it onto the canvas so it doesnt lag online

Yes.

You set your beam emitter to shoot at a location which is given with a trace function. Then you stick it to a weapons' bone or vertex.


Gah, I'm useless with emitters..any chance of a little push in the right direction? I'd fiddle with your vertexattach code but I can't find it anywhere! D:

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

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 10 Jan 2013, 14:51

Can anyone help me wrap my mind around traversing a linked list? I'm trying to get this five-item HUD display to work, but it's kinda shitty how the original works. Basically, I can understand how the currently-selected item is chose, as well as the Next and Previous items, but when I try to build onto this to get the Next Next and Previous Previous items to complete the display, my mind just breaks.

So here's what's going on in the HUD function that draws inventory:

Code: Select all

   bGotSelected = False;
   bGotNext = false;
   bGotPrev = false;
   Prev = None;
   Next = None;

   SelectedItem = Pawn(Owner).SelectedItem;

   for ( Inv=Owner.Inventory; Inv!=None; Inv=Inv.Inventory )
   {
      if ( Inv == SelectedItem )
         bGotSelected = True;
      else if ( Inv.bActivatable )
      {
         if ( bGotSelected )
         {
            if ( !bGotNext )
            {
               Next = Inv;
               bGotNext = true;
            }
            else if ( !bGotPrev )
               Prev = Inv;
         }
         else
         {
            if ( Next == None )
               Next = Prev;
            Prev = Inv;
            bGotPrev = True;
         }
      }
<other stuff trimmed>


Again, THIS part makes sense, but it is mind-boggling to me trying to figure out where the hell I can expand this with a Next2 and Previous2 var or, hopefully, rewrite the whole system to be more efficient and less awkward and ugly.

Anyone have any advice here?
Image

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

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 10 Jan 2013, 22:42

Been looking at this sometime ago as well. A way I had in mind was to first make a array/list of all the (activatable) inventory items, then looking for the SelectedItem and pick the next/prev ones from there. Currently working on my HUD so unless anyone beats me to it, I could have the code done in the weekend.

Previous Next

Who is online

Users browsing this forum: No registered users and 18 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited