Need help with civilization movement and also giving created objects there own health

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • with civilization movement and also giving created objects there own health. 2 different projects. I have already started on one and got the main core of the engine done now i just need to know how to give creatures there own health without having to create 100 of the same monster 100 times and create 100 separate health bars if you know what i mean.

    Also the civilization movement is where you hold in the left click and the move ring shows up around your player that is selected and is attatched to a grid also and can only move so many tiles away from where he is depending on the type of unit it is. I would really appreciate it thank you all in advance just for at least reading this and taking the time to maybe try to help :)

  • I'm not sure about the Civilization movement (I played the fourth one but this doesn't sound familiar to me), but creating monsters with their own values is very easy using the event editor. Create one in the frame editor and either uncheck "Create at Start" in its properties or use a "Start of Frame: Destroy" event in the event editor. Next, create an event trigger (Start of frame, user presses a button, timer = 2 seconds, etc.) that starts a Fast Loop. Name the fast loop, "Create monsters," and run it 100 times. Add a new event: On loop "Create monsters," create a monster, set that monster's position to where you want it to be using set X and Y positions (use a global value or a counter or something similar to control their starting positions and then advance it on each loop), set the health to whatever you want, and whatever other values you might need. I'd suggest giving each one an ID so that you can access it later using the ForEach object but there are plenty of other ways of doing that.

    Good luck!

  • Well thank you for that lol sounds not very easy though haha. i got about half of what you said, would you possible be able to make an example for me? That would be wonderful :)

    Actualy by the way i was referring to civ 4.like when you want to move your warrior or your scout or your settler, you left click on them and then you hold in the right click button and choose the destination and let go and he will go there based on turns (turn based game) and movement 1 or 2 tiles per turn (tiles like the map is a grid)

  • Please login to see this attachment. This is highly simplified but maybe it'll help you. I left out the ForEach stuff because it isn't necessary here. A very basic movement engine, too, when you left click a diamond. That certainly needs to be cleaned up but maybe it shows you one way of doing this without even touching ForEach.

  • im not sure i understand if we are on the same page, i do really appreciate your help though. i start it and there's like 100 diamonds on the screen and when i left click things show up but the object cant move. I'm kinda slow i think lol i am sorry.
    I really appreciate the trouble you are going through to help me though because i looked at the events and was just like woooaa lol

  • It can move. That's what the movement pads are for. Click one of the diamonds, then click one of the circles, and the diamond that you clicked on will jump to that space.

    I don't remember the specific details of how things move in Civilization IV but I remember it's a hexagonal board, which I couldn't replicate quickly. Off the top of my head I don't know the math or algorithms for creating hexagonal patterns around objects.

    Let me adjust it to what you were talking about in your first post. Please login to see this attachment.

    Unfortunately I don't have much time to perfect something like this or do it all for you but hopefully this points you in the right direction. It still isn't using ForEach. Basically you'd assign each monster (at creation) an ID or type (dragon, ghoul, etc.), and then run a ForEach loop for each Monster. On the ForEach group for Monster and Monster Type = Dragon, you'd change it to whatever values a dragon has. :) But it's real-time manipulation of game mechanics, which I didn't build into this file because I don't know if you need it.

    Edited 2 times, last by Snail (October 20, 2013 at 3:16 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!