Home   Help Search Login Register  

Author Topic: Military ID Cards  (Read 2760 times)

0 Members and 1 Guest are viewing this topic.

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Military ID Cards
« on: 30 Jul 2010, 16:03:12 »
I have been working on a good military base, I have barriers, guards, and everything, but, there is something missing...  Military ID Card check.

How do I make a sentry challenge a Player for an ID Card, giving the player the option to display it (if they have it) and then proceed inside, and if player does not, he cannot enter.  And how would I make it work in multiplayer?

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Military ID Cards
« Reply #1 on: 30 Jul 2010, 17:06:45 »
Many questions. No simple answer except this: Go figure it out!  ;)
I would start with dividing the problem into different categories:
Quote
(1)How do I make a sentry challenge a Player for an ID Card, (2)giving the player the option to display it (if they have it) and then proceed inside, and if player does not, (3)he cannot enter.  (4)And how would I make it work in multiplayer?

Here's a few hints to get you started with the scripting:

1) With a trigger detecting his presence (player in thislist)
2) addAction
3) Shoot him if he shows up without the proper ID card maybe. Or construct a blocking obstacle that the player cannot pass unless you remove it via script.
4) publicVariable is your friend here. Especially if you are using the player in thislist solution from #1 above.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Re: Military ID Cards
« Reply #2 on: 31 Jul 2010, 16:31:37 »
Im thinking the big problem is to identify the ID Card and present it.  Hmm....

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Military ID Cards
« Reply #3 on: 02 Aug 2010, 09:12:51 »
How about replacing the ID card with a simple password?
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Military ID Cards
« Reply #4 on: 02 Aug 2010, 21:40:58 »

 why not make an id card :).
   class it as an item then when given it can be read in the Gear menu , it can also be passed /took because its an item. as an addon its MP compatible .

 how to make this dynamic hmm , make it mision specific i guess  make the ID suit the role being played ?

 
I love ofp

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Military ID Cards
« Reply #5 on: 12 Aug 2010, 05:59:41 »
Never ever worked with MP editing but couldn't you assign a public variable to each playable unit, Have a trigger encompassing the checkpoint(or executes a script which checks distance of player(s) against checkpoint guard) that executes a script that sends the player as a parameter in an array and then checks that parameter against the public variable assigned to him/her? In essence any playable unit that enters the trigger area, activates the trigger which checks the playable unit identity against their assigned variable. The variable can be controlled through addaction to specific objects whether invisible or within another object, which switches the variable status of the assigned variable to identify whether the playable unit possesses a card or not. This would allow circumstance controlled by player death or other editor determined events to switch that variable status thus removing the card from said playable unit in the event that he is shot or captured or whatever.

This prevents the need for users to DL additional content, and allows the editor complete control over the cards status.

BTW, the invisible wall object is great for preventing potential breaking of your mission. Just place it near enough objects that make it believable enough to be impassable.