Translocator and BlockAll

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Translocator and BlockAll

Post by Barbie »

Because some players "cheat" by slipping through small holes with their TranslocatorTarget I added a BlockAll to prevent this. But a BlockAll - despite its name - does not block a TranslocatorTarget in online games.

Is there anything else that I can add (via UScript while map is loaded) to block a TranslocatorTarget?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Translocator and BlockAll

Post by sektor2111 »

Using another sort of Blocker with a function "Touch" properly written ? I think you know what I mean...
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: Translocator and BlockAll

Post by Red_Fist »

Use Cloudzones, loL , actually I wonder if that would work, the trans probably passes right through. What if you used specialevents, then the trans could create the event to stop player, not just the kill event but some other form to stop the trans or something and a message warning so players know things are blocked.

Wait, can't you use a trigger using ,class. collision ? then you could trigger something.
Binary Space Partitioning
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Translocator and BlockAll

Post by Higor »

Translocator is half-assedly coded, the only GOOD coded translocator module is Siege's.
https://github.com/CacoFFF/SiegeIV-UT99 ... rTarget.uc
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Translocator and BlockAll

Post by JackGriffin »

^this. Higor is right. I spent a weekend trying to 'fix' the trans as there are several ways to cheat with it. It just needs to be remade, the way it functions is not good at all.
So long, and thanks for all the fish
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Translocator and BlockAll

Post by Barbie »

Red_Fist wrote:Use Cloudzones
Sorry, you misunderstood what I want. For example there is a map with a small hole that leads to next level. If played without cheating a mover opens a passing to next level after finishing the current level. But it is possible to skip the current level by throwing the translocator through the hole. For that I want to spawn an obstacle ("BlockAll") at the hole while the map is loaded to prevent this.
Higor wrote:Translocator is half-assedly coded, the only GOOD coded translocator module is Siege's.
Thanks, after some adaptations ("sgBuilding" is unknown in UT) it works fine. :rock:

But I run into another problem with the pickup sound then: The TranslocatorTarget of my Monsterhunt version is not picked up when the owner touches it. I want to have that configurable and defined a bool for it:

Code: Select all

var config bool bPickupTranslocatorTargetOnRunover;
Then I adapted the code in the function Touch:

Code: Select all

simulated singular function Touch( Actor Other )
...
	bMasterTouch = Other == Instigator;

	// if I enable this line, the sound is played, otherwise not
	// bPickupTranslocatorTargetOnRunover = true;

	if ( bMasterTouch && ! bPickupTranslocatorTargetOnRunover)
		return;

	if (Physics == PHYS_None)
	{
		if ( bMasterTouch )
		{
			PlaySound(Sound'Botpack.Pickups.AmmoPick',,2.0);
			...
		}
		return;
	}
	if ( bMasterTouch )
		return;
	...
It looks like if the value of the variable bPickupTranslocatorTargetOnRunover is loaded from the configuration file, the pickup sound is not played.


@Admins: maybe move this to section "Coding"?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply