Jump to content

Ruud033

Former Developers
  • Posts

    1081
  • Joined

  • Last visited

Everything posted by Ruud033

  1. Tiberian Aftermath or something I believe. Anyways, for people who're wondering what I am doing right now, I am writing a script for the foliage collision volume. Right now it has to much impact to implement performance wise. I'll get back to mapping later. Edit: Today I've finished scripting the FoliageCollisionVolume.. Now it's time to get back to mapping. Feel free to use the Foliage Collison Volume script, it's downloadable. I've inmediately optimised my map for that script, added a lot of volumes, split some of them up. Also added / moved paths around. Added a few details and easter eggs somewhere.. Optimised and culled some stuff out where needed. Added blocking volumes @ gdi waterpath so you can not get on top of the rocks anymore Still have to do a lot of stuff.. will come over time. As it is summer in Europe right now, don't expect to much from me
  2. Average FPS is about 40 here. High = 50 low = 30. But I knew that FPS was going to be a hit with dynamic lights. Its looking cool though! I really like the cycle! As previously mentioned by Alkaline, the night time seems a bit off.. Is there a way in which you can set a float for the trace distance to cancel it out? To me it looked like we were in Alpha Centauri with the 2 suns rather than it being a moon . On the bright side: Your custom map really looks awesome. I know it was a drag to create / release this all by yourself and even show it to people while you;re doing it.... almost there!!
  3. when doing this: //Destroy the spawned meshes once untouched event Untouch( Actor Other ) { Super.Untouch(Other); ForEach SpawnedBlockingMeshes(class'BlockingMesh', mesh) { mesh.Destroy(); SpawnedBlockingMeshes.Length = 0; } } I get:
  4. Your current code does not work sadly I'm trying to figure out what's happening. The issue seems to be in line 69. Maybe you've done it wrong there? check out this: https://udn.epicgames.com/Three/UnrealS ... ators.html https://udn.epicgames.com/Three/UnrealS ... ayIterator http://wiki.beyondunreal.com/Dynamic_arrays Not sure what is going on there. //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage // Heavily modified by Ruud033 //============================================================================= class FoliageCollisionVolume extends Volume placeable; var BlockingMesh CreatedBlockingMesh; var Array SpawnedBlockingMeshes; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } //Search for each tree apart, the code goes trough the volume and searches each tree. event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local int i, j; super.Touch(Other, OtherComp, HitLocation, HitNormal); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); SpawnedBlockingMeshes.AddItem(CreatedBlockingMesh); } } } } } } //Destroy the spawned meshes once untouched event Untouch( Actor Other ) { Super.Untouch(Other); ForEach SpawnedBlockingMeshes(BlockingMesh, mesh) { mesh.Destroy(); SpawnedBlockingMeshes.Length = 0; } } defaultproperties { bColored=true BrushColor=(R=0,G=255,B=255,A=255) bCollideActors=true bProjTarget=true SupportedEvents.Empty SupportedEvents(0)=class'SeqEvent_Touch' } Edit: also posted on UDK forums https://forums.epicgames.com/threads/99 ... st31929327
  5. That's awesome (both of you)! I'll test this code tonight! Very excited about it. Thanks for the help Crnyo, I'll mention you in the top section. You delivered a critical piece of code there, I wasn't able to make it
  6. I'll add it to the test server asap.
  7. So I've gotten quite far in this already. It spawns the new dynamic actors when I walk in the zone BUT, it only destroys 1 actor (read: blocking mesh) when I leave the zone.. How can I make sure it destroys ALL created actors? Yosh spoke of a dynamic array of some sort.. Can anyone advise me on this? Every input is welcome. //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage // Heavily modified by Ruud033 //============================================================================= class FoliageCollisionVolume extends Volume placeable; var BlockingMesh CreatedBlockingMesh; //need dynamic array static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local int i, j; super.Touch(Other, OtherComp, HitLocation, HitNormal); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } event Untouch( Actor Other ) { CreatedBlockingMesh.Destroy(); } defaultproperties { bColored=true BrushColor=(R=0,G=255,B=255,A=255) bCollideActors=true bProjTarget=true SupportedEvents.Empty SupportedEvents(0)=class'SeqEvent_Touch' }
  8. Looking good there! Nicely done with that plane dude! Don't forget to cull everything inside the the plane out though! (don't cull the plane itself).. We don't need to see / render the PT from the ground You could do the green light easily with a trigger volume, if the interpactor touches it then > green. Have you ever thought about having the game 'move up' a bit after the base is destroyed? similair to 'Rush' in Battlefield.
  9. I'm considering coding an alternative scenario where we use the 'touch' event by any actor (bots included) and then spawn in the collision. would mean that we can regulate the load with the size of our volumes.. so, the bigger the volume, the bigger the load at once. The smaller the volume, the smaller the load (nearby)This also has it's advantages on the server side. (server should have less load, unless everyone starts tree hugging all at once but I doubt that will ever happen) At the moment i'm looking into spawning in the collision when an actor is nearby (looking for distance) but I'm running into many issues there..
  10. I don't need to use the localpc.pawn.location variable persé.. I could also use some other variable that outputs a location that's relevant to a player. CameraWorldPosition for example. Any other clues on this? Edit: So I've been looking into possibilities on how to do this. - Enable rigidbody blocking (failed because I was not allowed to add this value to the foliage, said the compiler) - Spawn collision by checking the distance between actors (failed because I can't get the correct distance calculation right! Don't know how to fix this. - Spawn collision by touching the volume (still looking into this right now)
  11. After some hours of thinking and trial and error I've got this code, it compiles well but I think it can't find the correct distance between actor and foliage. I think this is due to PC.Pawn.location, this node is not saying anything to me, its meaningless as far as I know. I had to make a local variable called "PC" (check the code) to get it to work and I still don't know what it does. ###So what I did now is I made a radical change. Now I am determining the locations of the foliage first, THEN check if the player is in range (because I already have the exact location's) THEN check whether the foliage is in a volume or not and THEN spawn the collision. It compiles correctly but still, does not work, it does not spawn in the collision. I think this is due to the playerlocation / actor location. I am thinking about putting a check around the foliage, a trigger zone.. so for instance, if an Rx_Actor is closer than 400 units, the script checks whether it's in a volume and THEN spawns the stuff.. rather than monitoring each player realtime. I don't know how to do that (yet). Have to analyse the trigger volume scripting. This is my code for now (as described in ###) //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage // Edited by Ruud033 //============================================================================= class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } simulated function CreateCollision() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; local float CollisionDistance; local playercontroller PC; //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); CollisionDistance = VSize(PC.Pawn.location - loc); //The distance between the two actors if(CollisionDistance<=400) //Checks when ever to create collision or what ever number if you have that { if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } } After compiling it only says this; Interesting stuff for player log: https://forums.epicgames.com/threads/89 ... d-Material http://www.polycount.com/forum/showthread.php?t=97548 https://forums.epicgames.com/threads/74 ... r-location
  12. Heya Kenz, I just saw episode 63, where you put the FoliageCollisionVolume in. Do note that we have been testing with that in the official testing server. I managed to cull the invisible blocking volumes out for FPS sake, but experience told us that the server is having a hard time calculating those meshes somehow. We don't know exactly where it comes from, but everyone in the server in my map (with foliagecollisionvolume) seems to have a high ping. After some googeling, it turned out that it was most likely that the server is calculating something. I'm working on a new version of the script which checks for distance between the player and the foliage, and only spawns it when it's closer than 400.. At the moment it spawns at once and then culls out. Also, you referenced the wrong thread in your comment section: viewtopic.php?f=136&t=75255&p=150513#p150513
  13. Nice! Keep up the good work!
  14. If function in function can't work, then make the second function outside the bracket. As long as the timer calls it by name, it should work... if(CollisionDistance<=400) //Checks when ever to create collision or what ever number if you have that { SetTimer(0.6f,false,'CreateCollision'); CollisionDistance =400; } } //<--Add a bracket here... { //<---and also below. That pretty much sums up making them separate. function CreateCollision() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; This worked! Below is the code. I still have my doubts about this code, I think it still spawns EVERYTHING once the client is in range of it.. I need to change the code to look for foliage instances, any idea on how to do that? //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage //============================================================================= class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } simulated function UpdateCollisionBasedOnDistanceTimer() //simulated functions are MAYBE client side only, have to try this! { local float CollisionDistance; local playercontroller PC; if(PC.Pawn == None) return; CollisionDistance = VSize(PC.Pawn.location - location); //The distance between the two actors if(CollisionDistance<=400) //Checks when ever to create collision or what ever number if you have that { CollisionDistance =400; SetTimer(0.6f,false,'CreateCollision'); } } simulated function CreateCollision() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } }
  15. Two questions: 1) Is the update link in the first post of this thread the most recent one with working bots in-game? 2) The first time I tried loading your map, I cannot find the Titan unit to buy. It should be an additional unit in the buy menu. Also, how can I summon the Titan via the dev console? 1) Yes 2) It's a seperate PT terminal in the destroyed WF. If you want to spawn it, its called (at the moment): summon titanmech.TA_Vehicle_Titan Edit: Oh lol just have seen Handepsilon's post.. Thanks HandE
  16. Nope, sorry but it's there already. Is a function within a function allowed?? I've also read somewhere that timers are not supposed to fire a function or something?? (Silo uses the same though)
  17. Code is bugging, dont know why //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage //============================================================================= class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } simulated function UpdateCollisionBasedOnDistanceTimer() //simulated functions are MAYBE client side only, have to try this! { local float CollisionDistance; local playercontroller PC; if(PC.Pawn == None) return; CollisionDistance = VSize(PC.Pawn.location - location); //The distance between the two actors if(CollisionDistance<=400) //Checks when ever to create collision or what ever number if you have that { SetTimer(0.6f,false,'CreateCollision'); CollisionDistance =400; } function CreateCollision() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; super.CreateCollision(); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } }
  18. I have tried to use UDK.exe but without luck. Cmd instantly disappeared. (directory reference and all is fine) the interesting thing is that, when I use ut3.exe from my unreal tournament 3 installation folder, it does work.
  19. Do you need to have UT3 installed or something? I only managed to get this to work with the UT3.exe from my UT3 installation. Not the UDK.
  20. Looking good there! I'm curious about the gameplay, would like to see how it turns out to be ! The airdrop feature is really really cool. I'm curious about how you're going to do this.. Are you going to have a static mesh animated with matinee and just get people in there somehow? .. teleporting, having a spawn point mid-air that disables after a while?
  21. I can implement this for you if you like. Let's do it for a week at first
  22. Today I've updated the map, fixed the bots. Get the update! Server is already updated. The only thing I forgot to change is the 2 second debug from the meteor, so the meteor comes in after 2 seconds.. other than that it's working great (I think).. just have to hope that bots don't fuck up
  23. Ruud033

    Harvester Spawn

    You can also use the custom teleporter mesh http://i.gyazo.com/c24cd8fba800e357bf5f0b1a499cf311.png That works for vehicles 100%. The only thing is you have to get the harvester through there.. http://www.moddb.com/games/unreal-tourn ... teleporter That will help you do it. I quickly made this, and it worked. Obviously you need to sort the harvesters out but that should not be an issue. http://gyazo.com/da4b9e9d3ae018cbd13c62bcc495aab6 Notice that I did not use the teleport mesh but just the node. Notice that the collision radius has changed on top of the cube. I've let the cube stay there because it spits out the harvesters rather than letting them implode in each other at 0,0,0 and get destroyed. Here's a .gif, you dont even see the harvesters spawning on top of the cube anymore because they instantly get teleported http://gyazo.com/e9d436182be61fa6c82bdedbeb7e98eb If you sort out which harvester drops where, you can sort GDI / Nod harvesters. They always spawn the same and they always fall at the same spot.
  24. I also have a lot of issues with the bot. I've tried to reset it but now I've lost my rights somehow. It does connect again though. I've added a new version of my map! with precompublabla volume in it! for performance sake! Please test the performance!
×
×
  • Create New...