No announcement yet.

Using blueprints within a recurrsive combo system?

  • Filter
  • Time
  • Show
Clear All
new posts

    Using blueprints within a recurrsive combo system?

    I have a combo system I'm using for the players and eventually the bots. All it is, is a collection of 'Combo' that contains the button to press and the animation to run.

    A combo has a collection of combo i.e. a list of potential buttons for the player to press next. An example could be like this:

    Click image for larger version

Name:	Exapmle Combo.PNG
Views:	1
Size:	2.4 KB
ID:	1133986

    E links to F and G
    G links to E again
    and F links to Q

    As you can see this diagram could easily become a blueprint. I would like to know how I would go about making this basic c++ class (currently doesn't have a header file) into a blueprint that the game developer can drag onto the blueprint of the player and add to and change at any point.

    Here's the class (need to work out strings ect):

    #pragma once
    class Combo
    		ComboID = 1;
    		//ComboButton = "";
    		ComboDamageScaling = 1;
    		ComboDelay = 1;
    		//ComboAnim = "swim_rt_rif";
    	int ComboID;
    	float ComboDamageScaling;
    	float ComboDelay;
    	TArray<Combo*> ComboList;
    	//string ComboButton;
    	//Name ComboAnim;
    	//SoundCue SwordClank;
    	void Add(Combo ComboToAdd)
    		if (ComboList.Length > 0)
    			ComboList[ComboList.Length] = ComboToAdd;
    			ComboList[0] = ComboToAdd;
    Just as an example the player might have a property like this, where the first combo is assigned to:

    Combo * StartingCombo;

    Any help making this work in blueprints would be great. If it comes to it I can always make it in code
    Last edited by Belven; 04-14-2014, 05:12 PM.

    Just updated the title. makes a lot more sense