Teleport(too easy for you, i think)

egomanyak

New Member
Reaction score
8
Teleport(too easy for you, i think)(Give me GUI)

Its too basic i think but i cant do it :D

Units must be teleported to areas
but every player have different bases, and shops in same base

so, units must be teleported to own bases every 1 minutes and comes back every 1 minutes

But i dont want blue units teleported to red zone, all players have specific bases.
Thanks :D
edit: also, unit must be does not metter, so its not unit specific, please :)
 

Bogrim

y hello thar
Reaction score
154
Trigger:
  • Actions
    • For Each Integer A from 1 to 12, do (Actions)
      • Set Temp_Group = (Unit owned by (Player(Integer A))
      • Set Temp_Point = Center of Player_Region[Integer A]
      • Unit Group - Pick every unit in Temp_Group and do Unit - Move (Picked unit) instantly to Temp_Point
      • Custom Script: call DestroyGroup(udg_Temp_Group)
      • Custom Script: call RemoveLocation(udg_Temp_Point)

This will zone your units to the center of a region. You can use this to move them back and forth, just assign the right regions to region array variables in the map init.
 

egomanyak

New Member
Reaction score
8
Trigger:
  • Actions
    • For Each Integer A from 1 to 12, do (Actions)
      • Set Temp_Group = (Unit owned by (Player(Integer A))
      • Set Temp_Point = Center of Player_Region[Integer A]
      • Unit Group - Pick every unit in Temp_Group and do Unit - Move (Picked unit) instantly to Temp_Point
      • Custom Script: call DestroyGroup(udg_Temp_Group)
      • Custom Script: call RemoveLocation(udg_Temp_Point)

This will zone your units to the center of a region. You can use this to move them back and forth, just assign the right regions to region array variables in the map init.

ummm can you give this in a map ? :confused:
 

Bogrim

y hello thar
Reaction score
154
Try doing it yourself first. That way you might ~learn~. :p

moreyouknow2.jpg
 

Bogrim

y hello thar
Reaction score
154
i tryed but what types of variables ? :confused:
Create a Group variable named Temp_Group.
Create a Point variable named Temp_Point.
Create two Region variables and check the array index, size 12.

In your Map Initialization, assign each region the corresponding variable. E.g. Player_Region[1] should be the region where Player 1 (red) should teleport.
 

egomanyak

New Member
Reaction score
8
Trigger:
  • Set Temp_Group = (Unit owned by (Player(Integer A))

How to make unit owned by?
also, newgen jass gives error about custom scripts i cant save it :banghead:
Give me map :p
 

Bogrim

y hello thar
Reaction score
154
I can't help you with errors generated by a custom editor. :p

For the unit group, select the "Units Owned By Player" function and for the player's function, use "Conversion - Convert Player Index To Player". This will allow you to change the player number to "For Loop Integer A".
 

egomanyak

New Member
Reaction score
8
I can't help you with errors generated by a custom editor. :p

For the unit group, select the "Units Owned By Player" function and for the player's function, use "Conversion - Convert Player Index To Player". This will allow you to change the player number to "For Loop Integer A".

There is no other way? :/
also, give me map :D
 

hopy

Active Member
Reaction score
64
Trigger:
  • Set Temp_Group = (Unit owned by (Player(Integer A))

How to make unit owned by?
also, newgen jass gives error about custom scripts i cant save it :banghead:
Give me map :p

Trigger:
  • # Custom Script: call DestroyGroup(udg_Temp_Group)
    • # Custom Script: call RemoveLocation(udg_Temp_Point)


Well make 100% sure that the whole text is exactly as the above text
Also "udg_Temp_Group" make sure that Temp_Group is replaced with the name of your Group variable.
And replace Temp_Point with your Point variable.
(for example if your Group variable is called "hahaIown" make it :
Trigger:
  • # Custom Script: call DestroyGroup(udg_hahaIown)

And it IS sensitive for Capital Letters and stuff... so make sure its Temp_Group and not temp-group or something.

Cause it has been a while since I used newgen but I usualy got an error with custom script when I was removing a variable with the wrong name or one that didn't exist yet.

Player_Region[Integer A] is an variable with an array by the way ... so I ain't 100% sure what the custom script should be now ...
Trigger:
  • # Custom Script: call RemoveLocation(Player_Region[Integer A]
?

Also for the rest of the trigger you will just have to experimemnt and search in the drop bars for the right thing.
The only way to learn the triggering is to practis so just giving you a map wont help you for long. :p

And:
Trigger:
  • Set Temp_Group = (Unit owned by (Player(Integer A))

How to make unit owned by?
With the set variable command (nbr.8 in the action drop bar), select your Group variable.
Than click value ... in the drop bar select "Units owned by player" (9th)
Next replace "player 1 (red)" with "Conversion - Convert Player Index To Player" (7th in the bar) and replace the 1 with "For Loop Intreger A"

Just search a bit
 

egomanyak

New Member
Reaction score
8
Trigger:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_group[12] = (Player group((Player(12))))
          • Set Temp_point[12] = (Center of Region 007 <gen>)
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Triggering unit) instantly to (Center of Region 007 <gen>))
          • Custom script: call DestroyGroup(udg_Temp_group)
          • Custom script: call RemoveLocation(udg_Temp_point)

Where i wrong :/
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, first te variables you have there are arrays...
Remove that, or change the custom scripts to this:
Trigger:
  • Custom script: call DestroyGroup(udg_Temp_group[12])
    • Custom script: call RemoveLocation(udg_Temp_point[12])


Then, also the variable Temp_group is supposed to be a "Unit Group" variable, not a Player Group variable...

And it should be set to this:
Trigger:
  • Set Temp_group[12] = (Units in (Playable map area))


And then you're still not using those variable where they're supposed to be:
Code:
Unit Group - Pick every unit in [COLOR="Red"]Temp_group[12][/COLOR] and do (Unit - Move (Triggering unit) instantly to [COLOR="red"]Temp_point[12][/COLOR])

And you also need an event for the trigger...
 

Bogrim

y hello thar
Reaction score
154
Triggering is a large part of map creation. If you're not willing to learn then you might as well stop now. You have already been given the form of a trigger that will work, try and make them match for starters.
 

egomanyak

New Member
Reaction score
8
Triggering is a large part of map creation. If you're not willing to learn then you might as well stop now. You have already been given the form of a trigger that will work, try and make them match for starters.

Trigger:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_group[12] = (Units in (Playable map area))
          • Set Temp_point[12] = (Center of Region 007 <gen>)
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Triggering unit) instantly to (Center of Region 007 <gen>))
          • Custom script: call DestroyGroup(udg_Temp_point[12])
          • Custom script: call RemoveLocation(udg_Temp_group[12])

its giving error :S
 

Bogrim

y hello thar
Reaction score
154
Start with making 2 region for every player, one region for their base location and one region for where they should return after being in the base. If you have 12 players, that's 24 regions.

Name each region after the player's index. For instance:

Player Base 01
Player Exit 01

Player Base 02
Player Exit 02

And create yourself a system that you can figure out.

Then create a map initilization trigger where you assign each region a region variable. For instance:

Trigger:
  • Region Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Base[1] = Player Base 01 <gen>
      • Set Player_Base[2] = Player Base 02 <gen>
      • Set Player_Exit[1] = Player Exit 01 <gen>
      • Set Player_Exit[2] = Player Exit 02 <gen>

When you have done this we'll continue step by step.
 

dudeim

New Member
Reaction score
22
Trigger:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_group[12] = (Units in (Playable map area))
          • Set Temp_point[12] = (Center of Region 007 <gen>)
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Triggering unit) instantly to (Center of Region 007 <gen>))
          • Custom script: call DestroyGroup(udg_Temp_point[12])
          • Custom script: call RemoveLocation(udg_Temp_group[12])

its giving error :S

you're trying to destroy a point in a destroy group function and the other way around try:

Code:
Custom script:   call DestroyGroup(udg_Temp_group[12])
                Custom script:   call RemoveLocation(udg_Temp_[point[12])

instead of
Code:
Custom script:   call DestroyGroup(udg_Temp_point[12])
                Custom script:   call RemoveLocation(udg_Temp_group[12])
 

egomanyak

New Member
Reaction score
8
Start with making 2 region for every player, one region for their base location and one region for where they should return after being in the base. If you have 12 players, that's 24 regions.

Name each region after the player's index. For instance:

Player Base 01
Player Exit 01

Player Base 02
Player Exit 02

And create yourself a system that you can figure out.

Then create a map initilization trigger where you assign each region a region variable. For instance:

Trigger:
  • Region Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Base[1] = Player Base 01 <gen>
      • Set Player_Base[2] = Player Base 02 <gen>
      • Set Player_Exit[1] = Player Exit 01 <gen>
      • Set Player_Exit[2] = Player Exit 02 <gen>

When you have done this we'll continue step by step.

Trigger:
  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Base[1] = (Center of Pbase1 <gen>)
      • Set Player_Exit[1] = (Center of preturn1 <gen>)
      • Set Player_Base[2] = (Center of PBase2 <gen>)
      • Set Player_Exit[2] = (Center of Preturn2 <gen>)

Yea i do it, and variables are point variables, yea?
 

Bogrim

y hello thar
Reaction score
154
You can use point variables too. It doesn't matter. Now we'll start with fixing your actual trigger.

First, edit your variables again and make the unit group variable you created a normal, non-array variable (just uncheck the array box for the unit group variable).

Then edit your trigger to look like this:
Trigger:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_group = (Unit owned by (Player(Integer A) matching ((Matching unit) is A structure) Equal to False)
          • Unit Group - Pick every unit in Temp_group and do (Unit - Move (Picked unit) instantly to Player_Base[1])
          • Custom script: call DestroyGroup(udg_Temp_group)

If you have any problems creating these actions just ask.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top