Translocator and BlockAll

Discussions about Coding and Scripting

Translocator and BlockAll

Postby Barbie » Sun Feb 10, 2019 3:50 pm

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
Barbie
Godlike
 
Posts: 1648
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Translocator and BlockAll

Postby sektor2111 » Sun Feb 10, 2019 5:27 pm

Using another sort of Blocker with a function "Touch" properly written ? I think you know what I mean...
User avatar
sektor2111
Godlike
 
Posts: 3912
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Translocator and BlockAll

Postby Red_Fist » Sun Feb 10, 2019 8:18 pm

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
Red_Fist
Godlike
 
Posts: 1452
Joined: Sun Oct 05, 2008 3:31 am

Re: Translocator and BlockAll

Postby Higor » Sun Feb 10, 2019 9:06 pm

Translocator is half-assedly coded, the only GOOD coded translocator module is Siege's.
https://github.com/CacoFFF/SiegeIV-UT99 ... rTarget.uc
Higor
Godlike
 
Posts: 1718
Joined: Sun Mar 04, 2012 6:47 pm

Re: Translocator and BlockAll

Postby JackGriffin » Sun Feb 10, 2019 9:29 pm

^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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3751
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Translocator and BlockAll

Postby Barbie » Mon Feb 11, 2019 5:39 am

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
User avatar
Barbie
Godlike
 
Posts: 1648
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Translocator and BlockAll

Postby UnrealGGecko » Mon Feb 11, 2019 1:31 pm

Sure thing, *moves thread to Coding* :thuup:
"NHL Rock The Rink" (PS1) announcer wrote:...And there are no stunt doubles in this game, folks!

My work for UT99: Counter-Strike VP, MaleOne+ & FemaleOne+ voicepacks (NEW!), DM-XC-NaliTreeV2 (from the ut99.org Xmas Contest mappack), my small spec of files at Google Drive

List of console converted maps, models & more!
User avatar
UnrealGGecko
Site Staff
 
Posts: 2149
Joined: Wed Feb 01, 2012 11:26 am
Location: Kaunas, Lithuania
Personal rank: GEx the Gecko


Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 5 guests