![]() | |
| | #1 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Quest Issue Well, I need to make it so that when a player finishes a quest, all players heroes' get experience. And that's it :P I'm pretty sure I was confused on something else also, but I can't remember, so I'll probably just edit this post... |
| | |
| | #2 |
![]() Join Date: Sep 2006 Location: Denmark (GMT+1)
Posts: 2,173
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Quest Issue Code: Done Quest
Events
Your Event for when the quest is done.
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User))) and do (Actions)
Loop - Actions
Hero - Add 1000 experience to (Picked unit), Show level-up graphics |
| | |
| | #3 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Re: Quest Issue Ahh, that worked, but the "For Each (Integer A)" had to be revised ![]() Code: For each (Integer A) from (Number of players in (All players controlled by a User player)) to (Number of players in (All players controlled by a User player)), do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User))) and do (Actions)
Loop - Actions
Hero - Add 10 experience to (Picked unit), Show level-up graphics |
| | |
| | #4 |
![]() Join Date: Sep 2006 Location: Denmark (GMT+1)
Posts: 2,173
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Quest Issue For each (Integer A) from (Number of players in (All players controlled by a User player)) to (Number of players in (All players controlled by a User player)), do (Actions) ... Ain't that like saying from 12 to 12? So only player 12 will apply to this. Also by saying "(Number of players in (All players controlled by a User player))" is normally alright, but the problem araises when people are leaving the game. Example: Player 1 and 12 is the only ones playing. Now your function will return 2 and take Player 1 and 2. Now Player 12 wont get anything. See the problem? Besides were I drinking when I made this? You don't need that loop. Throw it away. Code: Done Quest
Events
Your Event for when the quest is done.
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User))) and do (Actions)
Loop - Actions
Hero - Add 1000 experience to (Picked unit), Show level-up graphics |
| | |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Awaiting Confirm Arachnophopia Quest Bug | piotr9k | Bug Report Board | 1 | 02-01-2008 01:59 AM |
| Non-Snowy Tree Quest | Catz | Final Fantasy Epic RPG | 3 | 08-11-2007 03:49 AM |
| [Tutorial] How to show quest for one player | Mr. Zero | Submit a Tutorial [World Editor] | 9 | 07-18-2007 06:53 PM |
| [Tutorial] How to show a quest for one player | Mr. Zero | World Editor Help | 0 | 04-21-2007 07:10 PM |