Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jetty112 · Jun 07, 2014 at 10:30 PM · savesaveloadstrategygame savestate saving

Saving some aspects of game (save strategy)

Hello!

So i am making this counter-strike managet (look up CS manager) clone jut for fun and i have come to the point where i would like to save a strategy i have set up to be used later. How would i go about it? I did not know what to look for in the forums or unity answers. Please give me a direction to start heading. I have read about serialisation a little bit but what i have understood so far it is not exactly the right thing for my problem.

For anybody who doesnt know what CSM is or is too lazy to look it up i basicly set up astrategy for my soldiers to follow and hit play. And i want to create these strategies and save them and then use them against other peoples strategies.

I hope you guys can help with this.

Thanks in advance!

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dizzyman572 · Jun 08, 2014 at 12:17 AM 0
Share

What do you mean by 'save a strategy'?

avatar image jetty112 · Jun 09, 2014 at 11:02 AM 0
Share

Basicly the player can define where each of his soldiers hae to move in a match. This is a strategy. I want the player to be able to create said strategy and save it to be used in several matches.

PS: Check out www.CS-manager.com

avatar image MrFijiWiji · Jun 09, 2014 at 12:11 PM 0
Share

I'm assu$$anonymous$$g from the link you've provided, you're talking about the tactics screen that i can see on the front page. So the idea is, give your NPC soldiers a set of orders and they'll do what you've told them. Is that correct? Which part of this are you having difficulty with? The saving and loading of created strategies?

avatar image jetty112 · Jun 09, 2014 at 11:23 PM 0
Share

Exactly. Also i dont know if this comes into play in some way or not, but the strategies of 2 players must be loaded and then executed simultaneously. By that i mean that the tactics are loaded onto the map and then played against each other. I have build the logic behind the strategy making (waypoints and so on) but i dont know how to save them to be used later.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Kiwasi · Jun 10, 2014 at 12:09 AM

For those of you too lazy to look up the documentation on saving follow this link. You do actually have to click the play button yourself.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jetty112 · Jun 18, 2014 at 11:20 AM 0
Share

This was a little bit helpful, but i still dont get it. How do i save the existance of an object and its position? For example if i have a set of waypoints for a soldier to follow. How do i set these waypoints, their positions and rotations and the relations to each other (their order)?

avatar image Kiwasi · Jun 18, 2014 at 07:40 PM 0
Share

You do exactly as he did in the video. Create a custom serilizable class with all the saved data. Serialise the class. Write the class to a file.

Note that Vector3 and Quaterion are not inherently serilizable classes. You will need to break these down into their component floats and then reconstruct them.

Another option is to use this prebuilt solution

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Save Data Strategies 1 Answer

UnitySerializer Only Saving one Game Problem 0 Answers

Save Game Sceenes user quit aplication, Can I save the scene as a whole while leaving the game? 0 Answers

create text file in C#. 2 Answers

Issues with Save / Load system 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges