View previous topic :: View next topic |
Author |
Message |
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Mon May 12, 2008 12:48 pm Post subject: UT translocator |
|
|
OK this is a pretty general question I'm sure but I have a feeling Mental or Shadow may be able to point me in the right direction :-)
I have stripped out the Translocator from UT to use on my server and removed the ability to frag players or pawns. The other thing I would like to implement is to put a timer on it so it can't be used to block lifts or doors. I figured something like 15 seconds. You have 15 seconds to transport to your destination or else it destroys itself, preventing someone from placing them and running off blocking something with it.
The other possibility is, I'm running JcoopZ/DZmapM and it already has the ability to identify a player blocking a lift or door and if I can somehow incorporate the translocator as something that JcoopZ will recognize as belonging to the player who put it there it will warn them and then take action as needed.
What do you think guys?
Any ideas?
Thanks,
Bass |
|
Back to top |
|
|
Shadow
Joined: 31 Mar 2008 Posts: 97 Location: Ukraine
|
Posted: Tue May 13, 2008 12:37 pm Post subject: |
|
|
Hmmmmm.........
Basical thing about that - add to transloc projectile timer.When it is out,projectile being destoyed and returns to translocator.But I have no ideas now how release it and I'm busy-can only give few advices. |
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
Posted: Tue May 13, 2008 1:32 pm Post subject: |
|
|
you could use this:
Code: |
var bool bStopBlocking;
simulated function Postbeginplay()
{
super.postbeginplay();
SetTimer(5.0,False);
}
simulated function timer()
{
bStopBlocking = True;
}
simulated function ProcessTouch( Actor Other, Vector HitLocation )
{
local int hitdamage;
if(bStopBlocking)
if (TranslocatorProjectile(Other) == none && Mover(Other) != None)
Destroy();
}
|
or something like that...so when the door closes and touches the proj after 5 seconds, the proj dissapears. _________________ Unreallity - Wrath of the Skaarj is still developing! Check out the new refreshing website!
|
|
Back to top |
|
|
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Tue May 13, 2008 2:00 pm Post subject: |
|
|
That is an awesome idea Bleeder!!!
I will try that, thanks a lot
Thanks for the code help, I need it...
Bass |
|
Back to top |
|
|
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Wed May 14, 2008 12:12 pm Post subject: |
|
|
Hmm it doesn't do anything for some reason Bleeder I'm not sure why.
The code compiled fine after I changed "TranslocatorProjectile(Other)" to the proper projectile but it it doesn't destroy itself.
I placed it below a lift and the lift just keeps hitting it and going back up over and over.
I thought about disabling world collision but then it won't bounce off walls and such but what about disabling mover collision ? Is that possible instead?
Got any ideas?
Thanks |
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Wed May 14, 2008 2:09 pm Post subject: |
|
|
If the compiling went well it doesn't means it will work good because it didn't gave any errors. _________________
|
|
Back to top |
|
|
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Wed May 14, 2008 4:38 pm Post subject: |
|
|
mental-HunteR wrote: | If the compiling went well it doesn't means it will work good because it didn't gave any errors. |
I am aware of that, thanks for verifying that though Mental.
I was really asking "Why" it may not be working.
Any input on that?
Thanks,
Bass |
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
Posted: Wed May 14, 2008 5:20 pm Post subject: |
|
|
hmm maybe cuz of mover is set to ignore when colliding... but i have another suggestion, try this:
Code: |
simulated function Postbeginplay()
{
super.postbeginplay();
Disable('Tick');
SetTimer(5.0,False);
}
simulated function timer()
{
Enable('Tick');
}
simulated function Tick(float dtime)
{
local actor A;
ForEach Visiblecollidingactors(class'Actor',A,CollisionRadius+10)
if(Mover(A) != None) Destroy();
}
|
this will make the proj look for any nearby movers just more than its collisionradius, so when one is very close to it after 5 seconds, BAM!
just make sure that you dont have any needed things inside tick, cuz tick wont work the first 5 seconds.
you could use this variant of you need Tick:
Code: |
simulated function Postbeginplay()
{
super.postbeginplay();
SetTimer(5.0,False);
}
simulated function timer()
{
local actor A;
ForEach Visiblecollidingactors(class'Actor',A,CollisionRadius+10)
if(Mover(A) != None) Destroy();
SetTimer(0.1,True);
}
|
you first should try to set bStopBlocking true ingame, so i can see where the problems lies within the code, try using this ingame: admin set <PROJ> bstopblocking true
and for some reason timer doesnt like me sometimes, try setting the Settimer(5.0,false) in postbeginplay to (5.0,True) maybe that could fix the problem _________________ Unreallity - Wrath of the Skaarj is still developing! Check out the new refreshing website!
|
|
Back to top |
|
|
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Wed May 14, 2008 5:44 pm Post subject: |
|
|
WOW your just a wealth of information Bleeder..
Thanks I'll try those things and see what happens
Thanks again,
Bass |
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Wed May 14, 2008 8:37 pm Post subject: |
|
|
Yep ^^
he has all the time in the world, unlike other people here (Including me). _________________
|
|
Back to top |
|
|
Hybrid
Joined: 07 Mar 2005 Posts: 193 Location: TZ Warp Forge
|
Posted: Wed May 14, 2008 11:27 pm Post subject: |
|
|
If the problem is not resolved I have a suggestion.
bBlockActors : If set to True it will blocks actors (Unknown if Movers are included)
bBlockPlayers : If set to True it will Blocks players.
bCollideActors : If set to False should let it phase through actors.
bCollideWorld : If set to False and the object is movable , It will fall through BSP.
bProjTarget : If set to False , It can not be harmed by projectile actors.
I suggest you set "bBlockActors" to False and see what it does (Default properties of your projectile) _________________ Long live Unreal! -Hybrid
|
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
|
Back to top |
|
|
srbassalot
Joined: 16 Sep 2004 Posts: 229 Location: Earth
|
Posted: Thu May 15, 2008 2:28 pm Post subject: |
|
|
Quote: | I suggest you set "bBlockActors" to False and see what it does (Default properties of your projectile) |
That is really funny you say that Hybrid because I actually stumbled on that late last night and wondered, hmmm does that include movers? Guess what ?
It DOES :-)
Works like a champ AND it actually took care of one other issue I was going to have to code-out. I didn't want it destroyed by a players/pawns projectile and that is a non issue now....
I tried everything I could to get those lines of code working Bleeder but they had no effect no matter what I did and I followed your instructions to the letter. I do however REALLY appreciate all your help, you ARE the MAN!!! ;)
That is, I assume your a man...LOL
Thanks again guys
Bass |
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Thu May 15, 2008 2:32 pm Post subject: |
|
|
srbassalot wrote: | Quote: | I suggest you set "bBlockActors" to False and see what it does (Default properties of your projectile) |
That is really funny you say that Hybrid because I actually stumbled on that late last night and wondered, hmmm does that include movers? Guess what ?
It DOES :-)
Works like a champ AND it actually took care of one other issue I was going to have to code-out. I didn't want it destroyed by a players/pawns projectile and that is a non issue now....
I tried everything I could to get those lines of code working Bleeder but they had no effect no matter what I did and I followed your instructions to the letter. I do however REALLY appreciate all your help, you ARE the MAN!!! ;)
That is, I assume your a man...LOL
Thanks again guys
Bass |
Yea sure it does Movers are actors to ! _________________
|
|
Back to top |
|
|
Hybrid
Joined: 07 Mar 2005 Posts: 193 Location: TZ Warp Forge
|
Posted: Thu May 15, 2008 11:48 pm Post subject: |
|
|
Meh..Brushes are actors too _________________ Long live Unreal! -Hybrid
|
|
Back to top |
|
|
|