Aller au contenu

Photo

Proximity Rewards: A possibility?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Xeneize

Xeneize
  • Members
  • 133 messages

Basically my idea is to try and encourage group-adventuring and group-rewards without the use of shared rewards via party (We know that if we use party-wide rewards, it ends up giving it to all party-members regardless of where these members are across the server)

 

Thus I was curious if such a thing is doable at all? For a NPC to take into account the immediate PCs within a certain range radius and do something to them? (Journal updating, granting items, xp, gold, etc)

 

I would be very interested in learning how to do it, or similar options.

 

Thank you for reading and helping in advance.



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

It would simply be a matter of replacing the existing GetFirst/Next commands in a scripted loop (PC, FactionMember, etc) with GetFirst/Next object in shape. Any existing GA_ script that loops through the party could be modified as such.

 

You can take a look at any AoE spell script (like fireball) to see how to search within a specified radius.



#3
rjshae

rjshae
  • Members
  • 4 485 messages

You could also use LineOfSightObject() to check whether the recipient is within the line of sight of the reward source. An alternative is the GetObjectSeen call, assuming nobody is hiding or invisible.



#4
Tchos

Tchos
  • Members
  • 5 042 messages

Another option is GetDistanceBetween the reward source and the players, giving the reward to anyone with a distance < x.