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
Ok guys, here's an alpha.
(remember this is latin for "doesn't work" :D )

All it has at the moment is:
* a working GUI
* it spawns a key mesh on round start.

That is all... and the spawning stuff needs to be COMPLETELY rewritten because at the moment it can spawn in jails or arenas. To do this we can use the FindPlayerStart stuff in the Jailbreak class. Could someone else look into this please?

The SpawnedCardPickup variable will have to be change too, since that only allows one card. I'll look into that with Mych's Tag idea.

To keep filesizes down in forum attachments, I think it's a good idea to stick to using the key mesh at this stage. Unless someone has a CVS server we could use?
 

Attachments

  • Goojfc alpha 1.zip
    5.4 KB · Views: 12

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
Good to see that this addon is back on the road again.

Spawning:
-done by: randomly selecting pathnodes to spawn there
-prob: don't select pathnodes which are located inside the arena or jails
-fix: exclude pathnodes inside the volume where players are tagged as 'jailed' (possible?)
-Respawn time: short (to prevent camping it)
-After Card usage: next respawn delayed with 30 secs

Taking Card:
-Picking it up -> store in inventory
-Show pic in HUD to tell you indeed picked it up
-Play: 'GET OUT OF JAIL FREE CARD!'-sound only to player who picks it up

When dying:
-Keep inventory
-prob: inventory is dropped after dying
-fix: create subclass which will prevent the 'drop inv. when you die'-function or which will give the card to the last player who picked it up when it's unknown whether the card is supposed to respawn or carried by a player

Activating Card:
-When using it: select in inventory and press the activate button which goes along with it
-When whole team would be jailed, while someone on that team holds the card: activate card automatically

Drop Card:
-When becoming a llama (llamas have hoofs, which cannot hold a card :D)
-With 'drop inventory'-button if exists, else not (isn't necessary)

Should have everything now :tup:
 
Last edited:

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
Hmm... that's not quite it.

The current code picks a random pathnode. (I borrowed it from UT's relics system.) It needs to be scrapped entirely -- not a "workaround", a "rewrite" :)
We should instead use the system already existing in the Jailbreak class that determines where to spawn players when there are not enough PlayerStarts. This is quite a complex system with a number of functions involved. Someone needs to look into how it works! (The major obstacle I see is that the system considers team, and we don't.)

Please keep separate in your mind the problems of how to CARRY the card and how to USE the card :)
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
*workaround = work around the problem (for instance rewriting). I dunno what you exactly understand by workaround...

problems with how to carry and how to use the card? I'd say you have to put up a two variables: one to know whether it's taken and one to know who has it. Using has something to do with the inventory, and since that's been completely unused in UT2004 till now, I don't know what to do there....

I just don't get you quite well on the second part. Isn't it possible to exclude the pathnodes who are within the volume that marks players there as "jailed"? Players who are inside the arena or in jail are known as jailed. There should be a way to exclude those pathnodes from the random selection.
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
I don't think we are using the word 'inventory' in the same way... when I say "Inventory" I mean a subclass of Inventory. THis is a very specific thing. We probably won't be using this, because as I said earlier, ALL inventory actors owned by a player are destoyed when the player is killed.

"workaround" usually means to me a less-than-perfect means of solving a problem.

As for the pathnodes... we perhaps could ourselves exclude pathnodes, but it could end up being horrendously complicated. Far easier to reuse existing code.
 

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
Ok, started looking at the code for JBTag.

I can see two possible approaches here:
1. A JBTagGoojfCard is spawned for the PlayerReplicationInfo when the player takes the card pickup. When the card is used, the JBTagGoojfCard is destroyed. Disadvantage: the Addon class has to be notified of when this happens, and has to handle spawning another card pickup.
2. The JBTagGoojfCard actor(s) are spawned at the start of the game, and are never destroyed. When the card is picked up, they are registered with the PRI, and when the card is used, they are unregistered. It is up to the JBTagGoojfCard (which would be the "main" representation of the card) to respawn another pickup once it has been used. (easy to do: just set the timer)

I am leaning toward approach number 2. Mych, if you're still following this thread, what do you think?

Though the problem with #1 makes me think of another question about how this addon should work -- should the card reappear as a pickup once it has been used? I assumed it would, but you might want it to disappear from the game completely until the next round.
 
Last edited:

The_Head

JB Mapper
Jul 3, 2004
3,092
0
36
36
UK
www.unrealized-potential.com
jrubzjeknf said:
(quickie)One thing getting straight: there's only 1 card that will be spawned around the place. Use it, and it comes available again.
I reckon it might be better the other way around so it doesn't respawn until next round. Even though it will be more exciting and fast paced like jrubzjeknf said (I'm glad copy and paste is inventeed writing that name right would be a pain :lol: ) This would also fit Jailbreak fast gameplay better. I'm tied.

1 thing that i don't think has been brought up is what happens is this: You have the GOOJFC and are the last man, you then get killed, You will need to code it so you can get out of jail without the death sequence being called.
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
1. Call me Nova^ ;)
2. Maybe better: fast respawn. When used, the next respawn is delayed with 30
3. When being the last on the team and killed, the GOOJFC should automatically be activated. That way that man won't end up (even for a short time) in jail, and thus the execution won't be triggered (and yes, I already brought it up at #85 'Activating Card' ;))

ps. @tarquin: Overlooked post #86. Will remember from now on ;). What Inventory concerns (gotta tell you I still know **** about coding, classes and functions): Make a subclass that records who holds the card. Then let it record if the player dies. If so, add the card (what is it then anyway, pawn?) to the player's inventory. Fixing this doesn't seem a real problem to me tbh.
 
Last edited:

The_Head

JB Mapper
Jul 3, 2004
3,092
0
36
36
UK
www.unrealized-potential.com
jrubzjeknf said:
1. Call me Nova^ ;)
I do normally, its just someone might not know ur same person.
2. Maybe better: fast respawn. When used, the next respawn is delayed with 30
It will work well either, some people may prefer it the other way around, then again you can't please everyone.
3. When being the last on the team and killed, the GOOJFC should automatically be activated. That way that man won't end up (even for a short time) in jail, and thus the execution won't be triggered (and yes, I already brought it up at #85 'Activating Card' ;)
Good, Just Checking. lol I didn't see it, since I posted yesterday there had been 20 odd posts so I must of missed it. Cheers, Good luck with coding
 

Jrubzjeknf

Registered Coder
Mar 12, 2004
1,276
0
36
36
The Netherlands
The_Head said:
I do normally, its just someone might not know ur same person.

For the people who don't know yet:
JRUBZJEKNF = NOVA^!!! :rolleyes::tup:


Got it? Great. Now back to the topic:
The_Head said:
It will work well either, some people may prefer it the other way around, then again you can't please everyone.

Don't edit spawntimes, try to keep this as close to the relics as possible. Quick respawning will prevent camping, and you gotta act quick to get it. JB is fast paced as Head said, and a fast respawning GOOJFC keeps you acute.

Updated that concluding post btw.

ps. Mychaeel, sry for the size of my text :shy:
 
Last edited:

tarquin

design is flawed
Oct 11, 2000
3,945
0
36
UK
www.planetunreal.com
jrubzjeknf said:
3. When being the last on the team and killed, the GOOJFC should automatically be activated. That way that man won't end up (even for a short time) in jail, and thus the execution won't be triggered (and yes, I already brought it up at #85 'Activating Card' ;))

That's a good point. When Last Man, card becomes activated automatically, even if it was set to manual activation in config.
 

Mychaeel

New Member
tarquin said:
This is quite a complex system with a number of functions involved. Someone needs to look into how it works! (The major obstacle I see is that the system considers team, and we don't.)
The system which selects PlayerStarts is more complicated than one that would just check whether a given PathNode is in jail or in an arena; part of the reason is the support for respawning a player at a specific PlayerStart after an arena fight via the TagAttachStartsWinner property in JBInfoArena.

To check whether a given Actor is in jail or in an arena, you can use the ContainsActorJail and ContainsActorArena functions in class Jailbreak.

Note that if a mapper explicitly attached PlayerStarts to an (open) arena instead of using the "Auto" setting, chances are that the mapper didn't also attach all PathNodes that belong to the arena, so you might end up finding a PathNode that's actually in an arena even though ContainsActorArena doesn't say it does. There's a way around that possibility that involves checking whether there's a valid bot path between that PathNode and a PlayerStart known to be in freedom, but for starters, using ContainsActorArena should be sufficient.

I am leaning toward approach number 2. Mych, if you're still following this thread, what do you think?
Yes, your second suggestion sounds like a good idea.