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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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