• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Current camera view... and local player

Status
Not open for further replies.
Level 3
Joined
May 26, 2009
Messages
34
Hi all
I have a question:
I want to make a researchsystem like in the game "The lord of the rings - Battle for middle earth", but my problem is I want to find out the current camera target...
I know there is a function for that, and I know, that I have to use local player therefor...
So the result is, that one player knows his own camera target loc, but the others do not...
Now I want to move a unit to this point and then.... pafff ... disconnection
Of course I want to make a multiplayer map otherwise I wouldn't have this problem....
I hope you can help me :con:
Here is a picture of how I made this:
 

Attachments

  • Current Camera.JPG
    Current Camera.JPG
    31.6 KB · Views: 112
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
...what?
I don't really understand what you're trying to say, what do you need?
(I've played BFME2, not the 1 though and you can't expect everyone to understand what you're saying when you refer to a game).

The hive also has trigger tags, these are very useful to show triggers like:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Create starting units (for all players)
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Enforce victory/defeat conditions (for all players)
(and it only took me about 5-10 seconds to do that, while you had to take a screeny, modify it, upload it and paste the URL here with image-tags).
 
Level 3
Joined
May 26, 2009
Messages
34
So first thanks for the tips (I'm new here :gg:)
I attach a picture of how it is in the game BFME1 so everyone know what I mean...
I simply want to find out the camera target of a specific player, because I want to calculate where I have to move the icons.
so first I want to know the target. I made it like that:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Triggering player) Equal to (Local player)
    • Then - Actions
      • Set Temp_Point = (Target of current camera view)
      • Set Temp_Point_2[1] = (Temp_Point offset by 450.00 towards 105.00 degrees)
    • Else - Actions
And then I want to move my Icon depending on the temp_point_2[1]
BUT this point only knows the triggering player, so that this wont work:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Triggering player) Equal to (Local player)
    • Then - Actions
      • Set Temp_Point = (Target of current camera view)
      • Set Temp_Point_2[1] = (Temp_Point offset by 450.00 towards 105.00 degrees)
    • Else - Actions
  • Unit - Move Links_1_U[(Player number of (Triggering player))] instantly to Temp_Point_2[1]
  • Point - Remove Temp_Point
  • Point - Remove Temp_Point_2[1]
This Trigger causes a disconnection because the game is asynchronous...

Is it possible to make my temp_point_2[1] global, so that every player knows this point?

hope you understand it now :wink:
 

Attachments

  • battle for middle earth 1.JPG
    battle for middle earth 1.JPG
    79.7 KB · Views: 128
Status
Not open for further replies.
Top