[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums | Starcraft II |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > Triggers & Scripts

Triggers & Scripts Discussions regarding GUI triggers & JASS/AI scripts may be found here. Please review the » JASS Tutorials » Trigger Tutorials

Closed Thread
 
LinkBack Thread Tools
Old 07-04-2009, 08:16 PM   #1 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
Challenge Terrain Change by the owner Problem

this is really hard trigger

I got my map got square / inside the square i made Region

I want make change terrain to Grass trim if someone build there
and if the owner die of the first building the terrain change to Dirt

i made simple trigger working . but i got 1 problem if blue or anyone else die all region turn to dirt can i set if you are the first to build you are the owner and only your terrain change to dirt if you die

can we assign to player those trigger

Here what i got
Attached Thumbnails
trigger-terrain-problem.jpg  

Last edited by SoldierDuMM; 07-04-2009 at 10:35 PM.
SoldierDuMM is offline  
Old 07-04-2009, 08:21 PM   #2 (permalink)
Forum Moderator ap0calypse
User
 
ap0calypse's Avatar
Map Moderator
 
Join Date: Jan 2007
Posts: 2,523
ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)
Just use a player variable for it...
Set the player variable to the owner of the builder and then create an if/then/else:
If Player_Variable = owner of entering unit
Then [all your actions]
Else you can create a game message, or just don't do anything... your choice :/

Ohh, the triggers leak... fix the leaks immeadiately.
__________________
ap0calypse is online now  
Old 07-04-2009, 10:12 PM   #3 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
Quote:
Originally Posted by ap0calypse View Post
Just use a player variable for it...
Set the player variable to the owner of the builder and then create an if/then/else:
If Player_Variable = owner of entering unit
Then [all your actions]
Else you can create a game message, or just don't do anything... your choice :/

Ohh, the triggers leak... fix the leaks immeadiately.
not working
SoldierDuMM is offline  
Old 07-04-2009, 11:18 PM   #4 (permalink)
Forum Moderator ap0calypse
User
 
ap0calypse's Avatar
Map Moderator
 
Join Date: Jan 2007
Posts: 2,523
ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)
Hm, I think I know what I've said wrong ^^
All right, set the Initial Value of the "Player" variable to "Neutral Hostile", or any unused player and do something like this: (Note: WE isn't open)
Trigger
First Trigger
Events
Unit - a unit enters [region]
Conditions
((Triggering unit) is a structure) = true
Actions
set Loc = Center of [region]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to Neutral Hostile
Then - Actions
Set Player[1] = (Owner of (Entering unit))
Environment - Create your deformation-thing at Loc
Wait 0.30 seconds
Environment - Terrain-change at Loc
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to (Owner of (Entering Unit))
Then - Actions
Environment - Create your deformation-thing at Loc
Wait 0.30 seconds
Environment - Terrain-change at Loc
Else - Actions
Custom script: call RemoveLocation(udg_Loc)


This assigns a player to the region, the terrain deformation/change only applies for that player.
If another player builds in that area, the terrain will not change.

Do the same for the second trigger, but use "Player[2]" or something...
__________________
ap0calypse is online now  
Old 07-05-2009, 12:17 AM   #5 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
... im to noob to make it ( how make Region to variable want to mean all region want someone build inside do something

Last edited by SoldierDuMM; 07-05-2009 at 02:39 AM.
SoldierDuMM is offline  
Old 07-05-2009, 02:37 AM   #6 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
Quote:
Originally Posted by ap0calypse View Post
Hm, I think I know what I've said wrong ^^
All right, set the Initial Value of the "Player" variable to "Neutral Hostile", or any unused player and do something like this: (Note: WE isn't open)
Trigger
First Trigger
Events
Unit - a unit enters [region]
Conditions
((Triggering unit) is a structure) = true
Actions
set Loc = Center of [region]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to Neutral Hostile
Then - Actions
Set Player[1] = (Owner of (Entering unit))
Environment - Create your deformation-thing at Loc
Wait 0.30 seconds
Environment - Terrain-change at Loc
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to (Owner of (Entering Unit))
Then - Actions
Environment - Create your deformation-thing at Loc
Wait 0.30 seconds
Environment - Terrain-change at Loc
Else - Actions
Custom script: call RemoveLocation(udg_Loc)


This assigns a player to the region, the terrain deformation/change only applies for that player.
If another player builds in that area, the terrain will not change.

Do the same for the second trigger, but use "Player[2]" or something...


Question : "Unit - a unit enters [region]" How to you make Variable Region mean every region ?

because i got over 150 region i cant do all this for each player
SoldierDuMM is offline  
Old 07-05-2009, 09:30 PM   #7 (permalink)
Forum Moderator ap0calypse
User
 
ap0calypse's Avatar
Map Moderator
 
Join Date: Jan 2007
Posts: 2,523
ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)
Erm, the "[Region]" is the same region as the event.
It isn't a variable, sorry for it being unclear.
__________________
ap0calypse is online now  
Old 07-06-2009, 01:58 AM   #8 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
Quote:
Originally Posted by ap0calypse View Post
Erm, the "[Region]" is the same region as the event.
It isn't a variable, sorry for it being unclear.
is there any way i can get variable because i got like 100 region to do for 11 player
SoldierDuMM is offline  
Old 07-06-2009, 02:27 AM   #9 (permalink)
Forum Moderator ap0calypse
User
 
ap0calypse's Avatar
Map Moderator
 
Join Date: Jan 2007
Posts: 2,523
ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)ap0calypse is a glorious beacon of light (547)
Ohh, like that.... yeah.

Create a region variable with an array and in the init-trigger, set them all to the correct regions
(e.g.: "Set Region[1] = Region 001 <gen>").

Then just loop the trigger...

Example without opening WE
Example
Events
Unit - a unit enters Region 001
Unit - a unit enters Region 002
Unit - a unit enters Region 003
... (all of them)
Conditions
Actions
For each integer A from 1 to 100 do
Loop - actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Region[Integer A] contains (Entering Unit) equal to true
Then - Actions
[MY PREVIOUS TRIGGER]
Else - Actions
__________________
ap0calypse is online now  
Old 07-06-2009, 06:51 AM   #10 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
Quote:
Originally Posted by ap0calypse View Post
Ohh, like that.... yeah.

Create a region variable with an array and in the init-trigger, set them all to the correct regions
(e.g.: "Set Region[1] = Region 001 <gen>").

Then just loop the trigger...

Example without opening WE
Example
Events
Unit - a unit enters Region 001
Unit - a unit enters Region 002
Unit - a unit enters Region 003
... (all of them)
Conditions
Actions
For each integer A from 1 to 100 do
Loop - actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Region[Integer A] contains (Entering Unit) equal to true
Then - Actions
[MY PREVIOUS TRIGGER]
Else - Actions

God you are intelligent ! XD // i will try when i will be more wake up thanks man
SoldierDuMM is offline  
Old 07-06-2009, 07:18 PM   #11 (permalink)
Registered User SoldierDuMM
User
 
Join Date: Nov 2008
Posts: 17
SoldierDuMM has little to show at this moment (1)
is not working :S
SoldierDuMM is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Unsolved] Item no longer drops after owner change Csicska World Editor Help Zone 4 05-17-2009 07:30 AM
[JASS] What do I need to change to make timer window display to owner of the dying unit? Lightstalker Triggers & Scripts 20 01-27-2009 08:12 PM
[Trigger] Unit Dies - All units of owner of that unit change ownership Phire126 Triggers & Scripts 8 08-14-2007 02:51 PM
[JASS] Change Owner, when HP is low Smiglo Triggers & Scripts 3 10-20-2006 08:42 PM
Request/Help for chanced temp change owner of unit by spell Impac7 Triggers & Scripts 10 06-29-2006 09:54 AM

All times are GMT. The time now is 09:35 PM.





Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1
Copyright©Ralle