Jump to content


Photo

Awesome 2d Rts Engine (similar To Warcraft/strcft)


  • Please log in to reply
103 replies to this topic

#21 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 22 January 2010 - 01:36 AM

I cant wait to have the finished engine!
  • 0

#22 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 23 January 2010 - 07:44 AM

Thanks for all of the support.

Update on progress: next update in 3 - 7 days - all i have to do is make it so buildings can make units/research tech and then the update will be released, and it will be pretty much finished - after that all i have to do is polish the engine so has near to no bugs. i will also make a manual to tell users how to use the engine but you can expect that to come out a lot later

Update has arrived!! refer to the first post for information

Edited by rude guss, 25 January 2010 - 04:04 AM.

  • 0

#23 jackyboyhenry

jackyboyhenry

    just jack

  • GMC Member
  • 466 posts

Posted 25 January 2010 - 04:43 PM

Error in code at line 112:
if build_target.is_built = false && build_target.is_placed = true

at position 26: Unknown variable is_built

that was in the update when i clicked on villager create
  • 0

#24 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 25 January 2010 - 11:26 PM

sorry mate, i know what the problem is: the "peon house" that you tried to click on is obsolete - and i forgot to delete it so you have to use "obj_building_template" instead of "obj_peon_house"

simply there is a big house and a small one - you cant use the big one, just make your own
  • 0

#25 msgundam

msgundam

    GMC Member

  • New Member
  • 2 posts

Posted 26 January 2010 - 11:33 AM

+9999 zillions for you,
thks alot for the engine, i got 1 request or question,

how can i add buy or sell npc? and the resource display kinda blured,,

some sprite example of my current project with your engine,

Posted Image

1. for now i have dificulty too add manual firing turrent at my sprite since the engine dint reconize the variable,
2. can you show me an example how to add buy and sell npc? so tht player can buy or sell stuff?
like buying a new ship or new turrent or new crew or even sell them, so when the player kills enemy they got a point and can trade for a new ship etc.
3. i'm trying to add custom quest mission, but still in learning progress,

i will show my mini project, when im done editing it.
thks in advance.
  • 0

#26 jackyboyhenry

jackyboyhenry

    just jack

  • GMC Member
  • 466 posts

Posted 26 January 2010 - 03:49 PM

sorry mate, i know what the problem is: the "peon house" that you tried to click on is obsolete - and i forgot to delete it so you have to use "obj_building_template" instead of "obj_peon_house"

simply there is a big house and a small one - you cant use the big one, just make your own


cheers.
  • 0

#27 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 26 January 2010 - 11:49 PM

2. can you show me an example how to add buy and sell npc? so tht player can buy or sell stuff?
like buying a new ship or new turrent or new crew or even sell them, so when the player kills enemy they got a point and can trade for a new ship etc.


- creating the button -
go to the buttons folder and duplicate the object "obj_button_template"
rename the duplicated object (for reference ill call it button_buy_ship)
go to the "left click event" of "button_buy_ship"
this is where you put the code to what happens when you click the button
so something like:
if global.points >= 10
{
global.points -= 10;
instance_create(ship);
}

THEN

- assigning the button -
youll wnt to assign this button to a building - so go to the building object you want and go to the "create event"
down the bottom you will find variables relating to the HUD button slots
just enter in that button_buy_ship into one of those slots.
  • 0

#28 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 28 January 2010 - 09:15 AM

WOOT!LIKE THE UPDATE!
  • 0

#29 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 198 posts

Posted 01 February 2010 - 03:50 AM

hmmm.. it came up with these error messages:

"
ERROR in
action number 1
of Step Event
for object obj_button_manager:

Error in code at line 49:
if obj_HUD.target.hud_gen_s1 != 99 { hud_gen_s1 = instance_create(-100,-100,obj_HUD.target.hud_gen_s1); hud_gen_s1.xpos = hud_slotx1; hud_gen_s1.ypos = hud_sloty1; }
^
at position 28: Unknown variable hud_gen_s1
"

"
ERROR in
action number 1
of Draw Event
for object obj_info_manager:

Error in code at line 4:
draw_text(view_xview[0]+namex-(string_width(obj_HUD.target.unit_name)/2),view_yview[0]+namey-(string_height(obj_HUD.target.unit_name)/2),obj_HUD.target.unit_name);
^
at position 65: Unknown variable unit_name
"


but it continued to work after I chose to ignore them. I did change the name in the unit_name variable in the execution code of the obj_unit_template .. am I supposed to change it somewhere else also?

Edited by stumlehb, 01 February 2010 - 03:58 AM.

  • 0

#30 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 01 February 2010 - 06:00 AM

stumlehb - i have a feeling that you copy and pasted units from the old engine version (02.7) to the new engine (11.0).
the problem is the units in the new version have more new variables than the ones that were in the old one, and some of the new hud elements require those new variables but cannot find them. what you can do to fix these errors is to compare the old create event with the new one and add the missing cariables yourself.

if a im totally of the mark, then can you tell me what to do to recreate these error messages.
  • 0

#31 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 198 posts

Posted 02 February 2010 - 12:59 AM

stumlehb - i have a feeling that you copy and pasted units from the old engine version (02.7) to the new engine (11.0).
the problem is the units in the new version have more new variables than the ones that were in the old one, and some of the new hud elements require those new variables but cannot find them. what you can do to fix these errors is to compare the old create event with the new one and add the missing cariables yourself.

if a im totally of the mark, then can you tell me what to do to recreate these error messages.


I did import them and checked them(hope I didn't miss anything though). I've been having some other error messages related to variables as well. but they seem to happen intermittently. for example it will say that the unit_hp variable for the enemies is not recognized, but I know that it is being used because I was able to kill some of those enemy units, before the error messages pop up for the same kind of unit later.. I'm wondering if it is a game maker bug of some sort, because I have had other random intermittent problems with game maker before.. for example, in another game, certain animations intermittently do not show all frames of animation, even though it shows all of them sometimes..

I'll try making all new objects from the templates again instead of using the imported ones...
  • 0

#32 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 07 February 2010 - 03:36 AM

NEW UPDATE!!

see first post for details
  • 0

#33 Zargy

Zargy

    GMC Member

  • GMC Member
  • 189 posts
  • Version:GM:Studio

Posted 08 February 2010 - 11:31 PM

Very nice! I like it!
  • 0

#34 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 09 February 2010 - 09:05 AM

if there is anything specific that you would like to know how to add to my engine please ask so i can help you
  • 0

#35 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 10 February 2010 - 11:28 PM

Omg , the new engine is more way better!

I have a problem...

How can i make my Unit morph or Evolve into a new form with new skills?

Example:

First Form:Larva
Must Morph into Egg after 5 minutes...
Second Form:Creeps
And when i want it to build something it must morph into the building i want it to be!

How can i do this?
  • 0

#36 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 11 February 2010 - 02:57 AM

for the first part use an alarm

*create*
alarm[7] = 5mins;

*alarm[7]*
im_pro = instance_create(x,y,obj_creep);
im_pro.selected = true;
selected = false;
instance_destroy();

for the next part just make it so when the creep builds a building it gets destroyed, and for the building:
*step*
if is_built = false
{
build_progress += 1(or a larger amount if you want it to be built faster)
}
  • 0

#37 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 11 February 2010 - 06:39 AM

Oh , thanks rude guss!

Finally fixed that thing!
  • 0

#38 Music Minion

Music Minion

    GMC Member

  • New Member
  • 94 posts

Posted 23 February 2010 - 11:12 PM

This is a very impressive engine. the design is genius and the fact that you did this while able to use an unregistered version of gamemaker without the pathfinding functions is amazing. My only complaint is you added a comment /*var*/ every time there was a variable and since my computer is older it slowed my keyboard for typing in different things =( But other than that I give it a 10/10
  • 0

#39 Snopel

Snopel

    GMC Member

  • New Member
  • 61 posts

Posted 25 August 2010 - 05:16 PM

i know you probably don't go and check the comments anymore but if you do i'm haveing a problem with one of the codes when i try to build a house

ERROR in
action number 1
of Mouse Event for Left Pressed
for object Obj_Button_House:

Error in code at line 7:
   if obj_HUD.target.is_built = true
                     ^
at position 20: Unknown variable is_built

also if you could explain how to make it so when say i press the build worker button it subtracts 10 res3 from the stockpile and could you make a readme tutorial to better explain how to do everything

Edited by Snopel, 25 August 2010 - 08:57 PM.

  • 0

#40 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 198 posts

Posted 01 September 2010 - 12:22 AM

also if you could explain how to make it so when say i press the build worker button it subtracts 10 res3 from the stockpile and could you make a readme tutorial to better explain how to do everything



add stuff in the obj_button_worker 'left pressed' event. here is an example of a button that builds a monk in my game and

//clicking effect - start
spr_state = 1;
alarm[0] = 1;
//clicking effect - end

//your own code to what happens when you press this button
if obj_building_template.make_progress = 0
{

if obj_resource_manager.res1 >= 100
{
obj_resource_manager.res1 -= 100;


if obj_HUD.target.is_built = true
{
    obj_HUD.target.make_power = 20;
    obj_HUD.target.make_object = obj_unit_monk;
    obj_HUD.target.make_time = true;
}
}
}

here it is again with a different unit:
//your own code to what happens when you press this button
if obj_building_template.make_progress = 0
{

if obj_resource_manager.res2 >= 100 && obj_resource_manager.res3 >= 10
{
obj_resource_manager.res2 -= 100;


if obj_HUD.target.is_built = true
{
    obj_HUD.target.make_power = 20;
    obj_HUD.target.make_object = obj_unit_bar2;
    obj_HUD.target.make_time = true;
}
}
}




not sure about your is_built problem.. how do you know what the target of the hud is? I'm guessing its not what you think it is at that moment.. but maybe you just need to add an is_built variable somewhere?

Edited by stumlehb, 01 September 2010 - 12:24 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users