Addon Idea - Get Out Of Jail Free Card

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
well the key mesh is already made and it's even already in the Jailbreak installation. You can find it in JBToolbox. I figure we can put around it a mini version of the basket emitter that's on the padlock.
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
If I have time I might try playing about a bit with code for this, but I'm not promising anything.

The main decision to make is this:
Is the Card represented by a weapon which the user switches to and can then press Fire to use or Drop to give to a team-mate?
Or is the card represented only on the HUD by an icon, and there must be a special key binding for it? (Though I am wondering if we could use 'best weapon' binding, since you don't HAVE weapons in jail)
 

RabidZombie

Freshly Removed Brains at half price!
Apr 29, 2004
111
0
0
32
tarquin said:
The main decision to make is this:
Is the Card represented by a weapon which the user switches to and can then press Fire to use or Drop to give to a team-mate?
Or is the card represented only on the HUD by an icon, and there must be a special key binding for it? (Though I am wondering if we could use 'best weapon' binding, since you don't HAVE weapons in jail)

Well the weapon idea wouldn't you loose it when you die (that way it would only be helpful if you walked in to jail yourself LOL)

The best weapon idea is good but i dont really like it for 2 reasons, one i don't know what my best weapon key is, and 2 i will forget it too easily. I think a gun would be best IF you can make it so you only ever loose it if you throw it to someone or u use it
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
it'll respond to a key, most useful is the use-key, since those are never used in JB maps anyway.

Will go look how to code either, but don't expect much of it. First time doing it :p
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
Mych, I have two important problems that perhaps you can shed some light on:

Inventory is destroyed when the player is killed -- how can we get round that? Should the object the player carries be an Info class instead?

I have made some basic code that spawns the pickup at a random pathnode (ok, so I copied UT's Relic system :D ) -- but how do I eliminate Arena and Jail pathnodes from consideration?
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
for 2: select all pathnodes without the ones within jail volume and arena volume? There should be a way to define the places which are used for jails and arena's (a player in an arena shows up as jailed. Deselect pathnodes within area where status 'Player Jailed' is active) (ps. I dunno a **** about mapping or coding, just trying to help you out as much as possible...)
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
I'll do it. Just gotta learn how to code though :B, but I'm getting help with that. I'll contact Rev for the cool monopoly card he made. And tarquin to ask if he's still on the project, cause I'm not gonna do any double work here :D

ps. how's kokrull's server? Checked thursday and it was still offline. How come?
ps2. good to have you back ;)
 
Last edited:

Zenny

I'm gonna steal your girlfriend.
Mar 14, 2003
571
0
0
37
Washington DC
I think it'd be best if it was bound to a currently unused key and appeared as an icon in your hud. You could probably do it similar to how the adrenaline system is kept between deaths.
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
adrenalin system is a stat system, like the health system. It's not about deaths either. It's about where to store the information whether you have the card or not and how you should be able to activate it. A weapon isn't an option, inventory is (has own predefined keys, but drops when killed), and making a new button for it would be unpleasent (another button, while my laptop is seriously, completely full with pretty much all the default keys and a few additional...:S)
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
adrenaline is coded into Pawn classes. So we can't imitate that.

I'm guessing the card should be an Info item that knows to which player it belongs.

We can use a different class for the 'pickup card' and the 'inventory card' (that's an Info class).
Pickup up the pickup creates the inventory, and when the inventory is used it is destroyed -- and the destruction notified the Addon class to wait some time & make another pickup.

I suggest we go with Mych's idea where the card is something you can switch to -- and then you can either Use or Drop.
 

Mychaeel

New Member
You can make a JBTag subclass to store that kind of persistent information -- Jailbreak uses several JBTag subclasses of its own to attach information and code to all kinds of actors.

JBTagPlayer, for instance, attaches to a player's PlayerReplicationInfo and stores information about the number of attack kills, defense kills and releases a player has done (among other things). You could make your own JBTag subclass that attaches to PlayerReplicationInfo too.

However, for the user interface, I still like the "inventory item" idea. You can use a HUD overlay registered with JBInterfaceHud to display an icon on screen when a player has the card, and to use it, the player would just have to use their PrevWeapon/NextWeapon keys to switch to it and press Fire (or the Use key) to activate it.
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
I would (also) bind it to the same key as the Machine gun / shield gun cycle.

Not sure how to do either of those though....

I'll look into implementing a Tag: I'm thinking the Tag actor would always exist and know it either belongs to a player or if not, the card is waiting to be picked up. A Pickup actor would handle the actual visual pickup representation.
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
How about adding 2 options (use GOOJFC/ drop GOOJFC) in the 'V' (for the taunts, team tactics etc) menu as an extra? It doesn't have to be used very quickly, and I don't really like using it as a weapon, because with my laptop I have very few keys compared to people with a normal keyboard. I still use my scroll wheel for the simple fact that I barely have any keys left to bind. IF there's a way to show up that white text (for ex. when you type fly: 'You feel very light') by a simple command in a .ini: then I can bind a key to bind other keys, and also let me know what keys had been set. If that's easily done, a weapon isn't that bad...
 

Mychaeel

New Member
jrubzjeknf said:
How about adding 2 options (use GOOJFC/ drop GOOJFC) in the 'V' (for the taunts, team tactics etc) menu as an extra?
From my experience with adding the "team tactics" submenu in that menu I can tell you that it's real hacky and a real pain to add anything there, I'm afraid...

What about the idea of having a player do a special combo move to activate the card? From what I see in the DoCombo function in class xPlayer, the amount of adrenaline needed to do a combo is defined by the specific combo class itself (through the AdrenalineCost variable in class Combo), not a hard-coded minimum of 100. So you could create a "get out of jail free" Combo subclass with an AdrenalineCost of zero that simply only does anything when activated (i.e. spawned) if the player activating it currently possesses the "get out of jail free" card.
 

ChaosJester

New Member
May 26, 2004
30
0
0
About adrenaline combos- How can you determine what combos a player has free? I don't think that binding the GOOJFC to an adrenaline combo is a safe idea to maintain compatibility with other mods/muts/gametypes. Personally, I think the Info Actor idea has merit. While possibly difficult to implement, it has the best chance of allowing the GOOJFC to remain with the carrier after the carrier being fragged. If necessary why not bind the Info Actor to the inventory so that after carrier death. the Info Actor checks what was in the inventory at death and if it includes the card, triggers the relevant inventory actors. If used, it is not in inventory at death and does not trigger the relevant code. No new bindings are needed that way, coding might be simple that way or very complex, I don't know. The HUD could be dealt with by adding an Actor that displays the image of the card only when the card is in inventory.
 

RevBillyG

Taking over the world.
Nov 10, 1999
1,262
6
38
Here's the JailCard files.
Comprises of JailCard.utx and JailCard.usx. There's no fancy animations or anything. The card and it's pivot point are placed on co-ords 0,0,0.

For spawning the card I'd suggest have the card tilted to about 45 degrees, starts off very small then gets larger and spins at the same time. Very simple :)
 

Attachments

  • JailCard.zip
    122.5 KB · Views: 11

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
The Info actor business and the matter of how to activate the card are more or less entirely unrelated.

1. The Info / Inventory stuff relates to the question: How do we know if a player has the card?

2. The combo / weapon / team orders menu / key bind relates to the question: How does the player use the card? (Obviously this part needs to check the player HAS the card... or only be available for the player if he has the card... but whatever we do in 1. above will provide a means of checking)

(Mychaeel, how about you post that UserFriendly comic about Quake... ;) )
 

TheSpoonDog

CBP3! Yarrr!
Jun 1, 2001
2,592
0
36
42
NZ
spoondog.beyondunreal.com
Is it possible to attach a small version of the card to their other hand bone (like when you pick up a second assault rifle)? Unless that will stop the assault rifle from attaching as well... Or simply have it float/spin above the player's head maybe.