Page 17 of 18

Re: UScript: Chat, Questions, Discussion

Posted: 05 Jul 2014, 15:46
by AlCapowned
http://pastebin.com/HXGGRTQb

Making it into a tournamentweapon didn't do anything. I opened UT today and summoned the razik in Oldskool's singleplayer mode just for the hell of it, and it worked once. After I restarted UT and summoned the razik again, it no longer worked.

Now it's just messing with me. :lol:

Edit:
I'm trying to get the Izarian's gibs to spawn blue blood effects. It mostly works, but there are red blood effects that mix with the blue effects. I'm sure that I'm missing something obvious.

IzarianChunks: http://pastebin.com/tVqH4hKC
IzarianCarcass: http://pastebin.com/JhG8RSRw
IzarianMasterChunk: http://pastebin.com/H955W9ri

Re: UScript: Chat, Questions, Discussion

Posted: 05 Jul 2014, 17:11
by Buff Skeleton
Where are you seeing the red blood, specifically? What happens when it appears? Is it when gibs are flying around, or is it when you shoot them, or something else?

I do see this: trail = Spawn(class'BloodTrail',self); in IzarianChunks. Unless you're overriding the textures for BloodTrail, that one is red by default. Are there red spurts when chunks fly through the air?

Re: UScript: Chat, Questions, Discussion

Posted: 08 Aug 2014, 06:09
by AlCapowned
That was the problem. :B I knew I was missing the obvious. Thanks!

Edit: I sort of figured out the cause of the previous problem with the Raziks. Changing the ShouldRespawn function in the singleplayer gametype to allow the Raziks to respawn will make the animations work. I have no idea why. :?

Re: UScript: Chat, Questions, Discussion

Posted: 10 Nov 2014, 04:35
by bob
I need to know if a vector is inside a rectangle created between 2 vectors.
upper corner , and lower opposing corner.

Heres what i started on

edges [x] are the corners.
corners are in no specific order.

function bool isinbox(vector p)
{
local bool ohyeah;

if (edges[0].x <= p.x && p.x <= edges[1].x || edges[0].x <= p.x && p.x <= edges[1].x)
{
if (edges[0].y <= p.y && p.y <= edges[1].y || edges[0].y <= p.y && p.y <= edges[1].y)
{
if (edges[0].z <= p.z && p.z <= edges[1].z || edges[0].z <= p.z && p.z <= edges[1].z)
{
ohyeah = true;
}
}
}

return ohyeah;
}



probably have about 100 other vector uestions after this ....;(

Re: UScript: Chat, Questions, Discussion

Posted: 22 Apr 2015, 05:44
by jaypeezy
So, if you've checked out this same board earlier this week you might have seen I'm trying to make a sandbox style, monster slaying map for Unreal 227. At the moment, I'm trying to write a custom CreatureFactory (dubbed MLCreatureFactory, for MonsterLab) that can be toggled between an on and off state. So far, the actor can only be turned on, but cannot be turned off. I can tell from that fact that, the activation message only displays once, but also the fact that monsters keep spawning even after I turn it off.

I'll post my code below. I'm creating the MLCreatureFactory as a child of the class I'm posting below. At the moment, the code only works when I activate the trigger, printing the message as expected listing the object's name and its status as 'true'. However, if I try to trigger the same MLCreatureFactory again, nothing happens.

In case you're wondering, the MLCreatureFactory is just a copy/paste job of the stock CreatureFactory, but extends from the class below. As far as I understand it, the child will just inherit what I wrote below in the way of the 'Waiting' state/'Trigger' routine. I don't know if that would have any sort of impact on things. What I thought the Trigger() function represented was a method that gets called whenever this actor (or 'self') is triggered. Hence, I assumed if it's getting called by something else, the state-switching ('bStatus = !bStatus;') and whatever follows would be reliably executed.

MLThingFactory: http://pastebin.com/irNjYXkg
MLCreatureFactory: http://pastebin.com/SHyMUkxU

Player Input question for PlayerPawn

Posted: 03 May 2015, 21:14
by LannFyre
EDIT:
I wrote a topic on this here:
http://www.unrealsp.org/viewtopic.php?f=3&t=3650

What do the following things do and where I can find them in Unreal's code:
aMouseX
aMouseY
aBaseX
aBaseY
aTurn
aLookUp
aForward

Re: UScript: Chat, Questions, Discussion

Posted: 22 May 2015, 01:57
by Buff Skeleton
Anyone happen to know what specifically causes projectiles to slow down in WaterZones? I'm guessing it's native code, as nothing I can search for through my entire source reference library has any mention of velocity modification at the Zone- or Projectile-level. If I want projectiles to NOT slow down in a WaterZone, I think I'm gonna have to force the velocity back to what it was when it first entered as soon as the projectile leaves again, yeah? :/

[Edit] lol yep

var float WaterEntrySpeed;

Then, in water entry function:

WaterEntrySpeed = VSize(Velocity);

and in water exit function:

Velocity = vector(Rotation) * WaterEntrySpeed;

So dumb. But it works at least!

Re: UScript: Chat, Questions, Discussion

Posted: 26 May 2015, 01:26
by Draco Nihil
I thought there's a flag in the ZoneInfo itself that controls if it affects PHYS_Projectile actors or not...

I don't have the editor handy to check because I'm on Linux.

Re: UScript: Chat, Questions, Discussion

Posted: 26 May 2015, 02:52
by Buff Skeleton
MoveProjectiles affects that, but it only adds ZoneVelocity to an existing projectile. All zones in question have a ZoneVelocity of (0,0,0), so I'm pretty sure nothing in the defaults controls it. Must be something native-level for bWaterZone.

Re: UScript: Chat, Questions, Discussion

Posted: 26 May 2015, 02:57
by Draco Nihil
Well in that case it is something native you most likely can't change. (Reminds me of a bizarre hack Casey showed me to disable the "don't walk off ledges" for playerpawns)

Fun fact, when I had to deal with projectile physics. I end up making some elaborate BS using PHYS_None. Bypasses everything at that point but then UScript is powering the physics, not native C++.

Re: UScript: Chat, Questions, Discussion

Posted: 04 Sep 2016, 21:02
by zYnthetic
Just noticed the sticky so I'll stop spamming new topics.

What makes Amplifier, ShieldBelt, and WeaponPowerUp different from every other pickup?
I'm spawning pickups and doing things to them with

Code: Select all

NewPickup = Spawn(SomeItem[ItemNum],,,Other.Location);
log("* * * * * * * * * * SPAWNED ITEM: "$NewPickup );

You can see it being demonstrated here that it works for everything except these three specific actors. When it comes to these, the log speaks for itself

ScriptLog: * * * * * * * * * * SPAWNED ITEM: None

Thinking it might have something to do with RemoteRole (the only difference I could find), I tried spawning a sublcass that is using Role_SimulatedProxy, like every other pickup that works. Still no luck.

Re: UScript: Chat, Questions, Discussion

Posted: 05 Sep 2016, 00:47
by zYnthetic
Ok, so not really a problem with the script. It seems to be an OldSkool issue. Everything works as intended if run as unrealshare.coopgame. OldSkool is breaking it by replacing the Amplifier and WeaponPowerUp (with it's own so it'll work with olweapons). I'm not really sure why it's replacing the Shieldbelt, but whatever. Time to find a work around now that I know it's not my script that's the problem.

Re: UScript: Chat, Questions, Discussion

Posted: 08 Sep 2016, 04:18
by zYnthetic
Seems I've run into a network reliability roadblock.
I'm spawning a pickup, then a flag, then setting the pickup as the flag's owner so that it can be attached via owner.location. The problem I'm running into is this doesn't always work for clients.

As you can see, the flare, flakbox, and searchlight aren't getting flags. This has nothing to do with the pickups (I've seen two clips spawn where only one had a flag). It also has nothing to so with the amount of items that spawn as I've seen it happen on single item spawns. I used to get flags floating in space and then I realized they were at vect(0,0,0). On a hunch I decided to have them self destroy if they didn't have an owner and this is where I'm at now. It's clear to me that owner isn't something being reliably replicated. I've tried using

Code: Select all

var const Actor Owner;
replication
{
   reliable if ( Role == ROLE_Authority )
      Owner;
}

but it either does nothing or I have no idea how to use it. Any thoughts on a solution or what the problem could be?

Re: UScript: Chat, Questions, Discussion

Posted: 08 Sep 2016, 05:46
by Buff Skeleton
Are they being spawned serverside? It would make more sense to have the flags 100% clientside, and generated by some class which is simulated, most likely.

If all else fails, this is an excellent replication reference guide and might give you some ideas: http://www.dontrollaone.com/Replication ... cation.htm

Re: UScript: Chat, Questions, Discussion

Posted: 08 Sep 2016, 08:43
by zYnthetic
Flags are spawned and set owner serverside while the display properties and location script is clientside. tbh I dont remember if I've tried spawning clientside yet. If that guide is anything to go by, and the experience I've already had with it, ownership sounds like it should stay serverside as properties set in simulated functions default if the actor becomes irrelevant, then relevant again, which pickups do every time the engine culls actors on clients. I've already gotten the script past that part (flags used to get destroyed if you stopped looking at them for a few seconds) so I'll keep reading to see what else I haven't discovered yet.