Home   Help Search Login Register  

Author Topic: Please a lil help with fairly simple Trigger Condition Script here/Rating  (Read 5493 times)

0 Members and 1 Guest are viewing this topic.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
sure, as long as it works, go with it. Thats a basic rule of ofp editing, as far as i'm concerned

here you go:
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"

I think i found all the typos as well, if not, just post the fixed version, and before you send it in, you may want to put it on the beta test board. To be sure there are no bugs
« Last Edit: 04 Dec 2004, 01:04:38 by Triggerhappy »

Mr.Pibb

  • Guest
 alright, thanks

 Of course, I will post results on this script too just to be sure

 btw, I was wrong on which script I tested with that, think it mighta been the lower one, I deleted it and tried ur new one and lost which one it was I guess lol, oh well, hopefully this one is all good.

 :)

 
« Last Edit: 03 Dec 2004, 23:43:31 by Mr.Pibb »

Mr.Pibb

  • Guest
 its still showing 0 as rating when leaving radius sometimes, I think its the new _ratingchange = 0 at the beginning , will remove and test, i think that will do it.

Mr.Pibb

  • Guest
 Ok

 It didnt matter, still returned 0 rating after leaving town(after second time doing it, first time it returned proper). I did find the script that worked for that everytime, reply #41, bottom script. He gets returned to his previous rating everytime it seems, must be something different there.

Mr.Pibb

  • Guest
 Tested the older script again, and ran in and out of the radius like 6 times with the 'grudge' set against player and it returned the proper rating everytime after leaving.
 Should I just use that script then?
« Last Edit: 04 Dec 2004, 00:25:55 by Mr.Pibb »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
the _ratingChange = 0 was always there, look back at some others, you'll see it. but i did add _entryrating = 0
so i took that out, and i put in delays so it won't lag in mp. now try it, i just modified the first one on this page
« Last Edit: 04 Dec 2004, 00:25:20 by Triggerhappy »

Mr.Pibb

  • Guest
 Ok, it looks like it works now :)

 Did only 2 jogs back and forth to and from town, but both returned proper ratings outside radius, cool.

 Ya, i was gettin a lil confused, that _entryrating = 0 was what I meant to remove lol, its only like the 20th time testing in the last 4 hours lol.

 great, so I assume I can just change that lil number there for the delay and thats the seconds it will delay for?

 Thanks, hopefully everything is good now

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
as long as by little number you mean the number next to the ~

you won't need a very fast loop though, because its just a guy running into a town, and a slow loop would actually be better, because there is no exact boundary to the towns, and so it will register at different points

Mr.Pibb

  • Guest
 100% fixed on that, did like 10 jogs back and forth, perfect score.

 Thought Id put down yer final version here minus the one typo.

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"

 Only thing left to test is multiple towns now, but seeing they work independently anyhow, it should be fine.
 
 Thanks everyone for their help with this, Triggerhappy, ur name will be in the credits of the mission if the whole thing actually gets done someday.

 Hopefully this is my last post in this topic too  :P lol

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
don't think so, unless you're an arse and don't respond (which you aren't)  ;)

if you need anything else, just ask, and are you still going to submit it?

Mr.Pibb

  • Guest
 Ya, I want to submit it to the Beta testing, but first I need to do all the final testing I can myself first because of my lack of knowlege in alot of the scripting commands, I dont want to get attacked by a problem from testers that I myself cant fix (which might happen anyhow)

 btw, was looking at the numbers here, couldnt find another topic in the next five pages that even come close to the number of replies and views  :o
 Nice to see that kinda help, and thank god for a resolve.

 I will certainly be delving more and more into command definitions and such so I am not posting difficult questions unless absolutely neccessary and dont plan on having anything else this complex in the mission.

 Thanks Triggerhappy, and all
« Last Edit: 04 Dec 2004, 01:25:34 by Mr.Pibb »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
it would be half this size if we realized earlier that the rating + 100000 was the problem..... ;D

good luck on your mission, i suggest you hit the solve button now that you problem is solved, so people don't come looking in here for nothing

Mr.Pibb

  • Guest
 ya, thank Sui for the discovery for that one, I dont know at all how to input a hint format, but when I thought of using his from that test mission, it put it all together.

 Lt.Pibb of the USS Nastramo signing off.