• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

new Shopping system

Status
Not open for further replies.
Level 17
Joined
Jan 21, 2010
Messages
2,111
hey guys!
i wanna ask a help, i making a RPG named Terrans!, in there we use new shop system that work like this:
1. a player select a unit, the unit is a shop.
2. then apply camera object to triggering player
3. and the another one to make this system looks great is, when the unit is in 500 range of the shop, then the shop cam is activated, else it will not work,
i can make the first one, but making the range, i cannot, so please help me
+rep to helpers
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The camera will be... where ?
Focused tot he "shop" ?
Should the camera be on ground floor (shoots out cinematic from ground to the shop picture, like First-Person Shooter camera)
Or, should it be from the sky camera ?
 
Level 4
Joined
Dec 7, 2010
Messages
62
This is what you need to do:

1: Create a new camera object (hotkey M).
2: Set the angle, distance and rotation to whatever you want to.
3: Make a new trigger with this event:
  • Shop System
    • Events
      • Unit - A unit comes within 500.00 of <Your shop>
4: To make sure it is a player-owned unit, use this condition:
  • Shop System
    • Conditions
      • ((Owner of (Triggering unit)) controller) Equal to User
5; Now, to apply the camera you have created, use this action:
  • Shop System
    • Actions
      • Camera - Apply (<Your camera object>) for (Owner of (Triggering unit)) over 0.00 seconds
6; Now, if you leave the shop, you will have to disable this camera for the triggering player. If you want to, I can create this for you aswell or do you know how it works?

Tip: Change the "over 0.00 seconds" to "over 1.30 seconds" or something if you want the camera to apply more smoothly.

-Devinity-
 

sPy

sPy

Level 21
Joined
Apr 10, 2009
Messages
268
You can also do this,
Make a region at the shop, and then do this:
  • Events
    • Unit - A unit enters Region
  • Conditions
  • Actions
    • Set MarketplaceTempPoint = Position of Marketplace 0050 <gen>
    • Camera - Pan camera to MarketplaceTempPoint for (Owner of (Triggering Unit)) over 0.10 seconds
    • Custom script: call RemoveLocation(udg_MarketplaceTempPoint)
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
thanks, but after all i wanna make the cam is Focused onto the Shop, like the first person camera, and only if the buyer is clicking or selecting the shop and also the buyer is on 400 (or maybe more) range from the shop, not when a unit enter region
 
Status
Not open for further replies.
Top