Home   Help Search Login Register  

Author Topic: u guys are gonna hate me..vehicles leaving towns, a prob with 'grudge' script  (Read 2425 times)

0 Members and 1 Guest are viewing this topic.

Mr.Pibb

  • Guest
 Hi again :)

 I cant say vehicles are a 'real' problem with the new script Triggerhappy came up with, its really the dam ofp program, I think.

 Found that a player with 'grudge' rating (rating -2000, renegade status) leaving the radius of the town in a vehicle, yes, he is indeed switched to regular rating status (freindly, above -2000). Problem is the dam vehicle he is in remains 'enemy', thus unless  the player exits and re-enters the vehicle, he is considered enemy in the vehicle even tho his rating is freindly. wierd. On the flip side, entering a town in a vehicle is fine, if his 'grudge' status is set with that town, him and the vehicle go enemy.

 Seems a thing with ofp tho, basically seems vehicles reflect enemy switched to freindly status only if they are boarded by a new side, they wont do it if the guy is still in there when it happens, till he gets out and boards again.

 Now, considered using setcaptive as a new alteration for the script and making res enemy, but in the mission there will be times when u, as player can join res 'clans' and jump in a fight with em, problem there is after trying to use suggested methods for switching sides by grouping the player under enemy res, the player still remains enemy to them, even tho to the player they are considered freindly.

 What really sucks is that I am altering a version of cti, so if a player is still denoted as enemy in a vehicle after leaving a town and tries to enter a new town, it wont add res fighters in that town cause he is denoted as 'enemy' side where I dont know if I can reference that side in the condtion, and making the addRes triggers activate by any side means no civil movements between towns anymore so they wont trip the trigger and cause lag. And of course would have to make it known u have to exit vehicle after these conditons, which is kinda unrealistic.

 So right now, only real alternative is to remove any in-town and town-town civil movements and make 'addRes' triggers activate by anyone, or if I can reference 'enemy' side I wont have to remove civil movements, but would have to force players to exit vehicles upon those certain conditions.
 Unless u guys know of a way to group a player to an res leader at a certain point in the game where the player would be considered freindly to res at that point, with the game set to res enemy to all.
 Or a way to get that dang vehicle to switch to freindly after leaving the town radius, I even used a hint format and the player in the vehicle (me) was at rating 3500, but side was enemy till I disembarked.
 Got a few other ideas rattling, but just wanted to ask before I made a decision in case there is something that could be done to fix this.
 And I thought this case was closed....... :P
« Last Edit: 04 Dec 2004, 22:55:00 by Mr.Pibb »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
post the final version of the script and i'll add what you need.
or, if you can find where to put it:
(vehicle player) join player


Mr.Pibb

  • Guest
Thanks for the reply Triggerhappy, although I have an idea where to put it, I put the final version up so u could throw it in there just in case I am wrong :)


Code: [Select]
_center = _this select 0
_radius = _this select 1
_town = _this select 2
_Grudge = false

#checkIn
_RatingChange = 0
?player distance _center <= _radius:goto "checkFriendlyKills"
~2
goto "checkIn"

#checkFriendlyKills
?_Grudge:goto "LowRating"
_EntryRating = rating player
#CheckRatingDrop
?rating player != _EntryRating:_RatingChange = (_EntryRating - (rating player))
?rating player < _EntryRating:_Grudge = true; goto "LowRating"
?player distance _center > _radius:goto "CheckIn"
~2
goto "CheckRatingDrop"

#LowRating
player addrating -100000
#WhileIn
?player distance _center > _radius:player addrating _RatingChange;goto "checkIn"
?rating player != (_EntryRating - _RatingChange):_RatingChange = (_EntryRating - (rating player))
~2
goto "WhileIn"

Hope it fixes the problem.

 Thanks

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Code: [Select]
_center = _this select 0
_radius = _this select 1
_town = _this select 2
_Grudge = false

#checkIn
_RatingChange = 0
?player distance _center <= _radius:goto "checkFriendlyKills"
~2
goto "checkIn"

#checkFriendlyKills
?_Grudge:goto "LowRating"
_EntryRating = rating player
#CheckRatingDrop
?rating player != _EntryRating:_RatingChange = (_EntryRating - (rating player))
?rating player < _EntryRating:_Grudge = true; goto "LowRating"
?player distance _center > _radius:goto "CheckIn"
~2
goto "CheckRatingDrop"

#LowRating
player addrating -100000
#WhileIn
?player distance _center > _radius:player addrating _RatingChange;(vehicle player) join player;goto "checkIn"
?rating player != (_EntryRating - _RatingChange):_RatingChange = (_EntryRating - (rating player))
~2
goto "WhileIn"

Mr.Pibb

  • Guest
had put it in same place,

Ran first test, got an error

Running second test, if error comes up again Ill type it in bout 5 min

Mr.Pibb

  • Guest
heres the error:

(vehicle player) join player |#|; goto "checkIn" : Error join : Type, Object, expected Array

 Seems to me needs direct name? Can the player that the script is running for be referenced in a variable that could be used? Or I could make a west soldier somewhere, name him and use that name to change the status of vehicles?

« Last Edit: 05 Dec 2004, 01:11:52 by Mr.Pibb »

Mr.Pibb

  • Guest
 changed parenthesis to brackets for [vehicle player] and it did work, but it didnt change enemy status. Said: "one, follow one" when executed, seemed like it was just assigning me to me. Tried using another west unit and it still didnt change vehicle status, I think its a problem with the vehicle itself, not the player even tho the player is considered enemy with freindly rating, its only when he's in the vehicle, and I dont think there is a command to change vehicle side status at all.

 Got a question, I have been trying to find out if a player activated a trigger for dealing with the 'enemy' vehicle bug when a player enters a town with enemy status:

Original Condition:
Condition:
this && ((west countSide thisList > 0) || (east countSide thisList > 0))

And I want to add something like

 this && ((west countSide thisList > 0) || (east countSide thisList > 0) || (player thislist))

And it didnt trip when I went thro (me being on enemy side only player would trip it)

can u tell me what I need to type to reference the player that activated the trigger (if a player did)

 Thanks, I can tell u this is definitely the last peice to the puzzle here, everything else works perfect.
« Last Edit: 05 Dec 2004, 01:40:36 by Mr.Pibb »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
player in thislist

I'm too drunk to understand this thread, but sober enough to comprehend that the code

(player thislist)

doesn't make sense.   There is no verb, or operator I suppose its called in computerProgrammingSpeak.
Plenty of reviewed ArmA missions for you to play

Mr.Pibb

  • Guest
 Thanks macguba, think I tried that already from a script I got from the editors depot, will try again, have tried like friggin 5 dif combos and not one has tripped the dang trigger when the player is 'enemy' side.

 :) never give up, times like this I gotta remember that lol

Mr.Pibb

  • Guest
 the condition still not responding to that either, going to keep looking around for the right script, of course my last option is to merely type all of the players names, but I dont know if that might cause some lag being there would be like 20 triggers with 9 players names in each condition feild.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
go back to using the script.
two options to try:
1)change player in the error part after join to [player]
or
2)change it to group player

Mr.Pibb

  • Guest
sorry to say Triggerhappy, neither worked

 First method returned error ( can get it if need be )
 Second method did execute, said : "one, follow one" and vehicle status remained the same
 Sorry to say but I think as I said earlier this is a problem in ofp, it just wont switch vehicle status from enemy to freindly without vehicle being emptied first.

 Now, :) being it seems there is also no way to reference the 'player' in a condition feild, does anyone know if there is a way to have a player join an res enemy group at some point in game where joining would cause being freindly? My tests so far show joining still keeps u enemy, even tho once joining res are shown as freindly units.

 Prolly just have to improvise here and spend some time thinking about the best way to do this anyhow, thanks for the help :)
« Last Edit: 05 Dec 2004, 03:25:52 by Mr.Pibb »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
stroke of inspiration(if thats what it is called):
in place of (vehicle player) join whatever put
(vehicle player) addrating 100000

Mr.Pibb

  • Guest
will get that tested tommorow dude ;)
All pooped out tonight

 will get back on results

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
If it works this is the way it should b implemented so that you won't give the player an extra 1000000 rating when he leaves without a vehicle

Code: [Select]
_center = _this select 0
_radius = _this select 1
_town = _this select 2
_Grudge = false

#checkIn
_RatingChange = 0
?player distance _center <= _radius:goto "checkFriendlyKills"
~2
goto "checkIn"

#checkFriendlyKills
?_Grudge:goto "LowRating"
_EntryRating = rating player
#CheckRatingDrop
?rating player != _EntryRating:_RatingChange = (_EntryRating - (rating player))
?rating player < _EntryRating:_Grudge = true; goto "LowRating"
?player distance _center > _radius:goto "CheckIn"
~2
goto "CheckRatingDrop"

#LowRating
player addrating -100000
#WhileIn
?player distance _center > _radius:player addrating _RatingChange;(vehicle player) join player;goto "vehicleBugFix"
?rating player != (_EntryRating - _RatingChange):_RatingChange = (_EntryRating - (rating player))
~2
goto "WhileIn"  

#vehicleBugFix
?vehicle player != player: vehicle player addrating 1000000
goto "checkIn"