Find and Replace attributes in rules??

iTouchGameriTouchGamer Member Posts: 681
edited August 2012 in Working with GS (Mac)
Hey guys, I'm nearing the completion of my next game and I have to do a lot of copying and pasting of rules and changing the attributes. IS there a way to "Find" an attribute, then replace it with a different attribute, kinda like in emails or word documents.

Thanks!

Best Answers

  • gyroscopegyroscope I am here.Posts: 6,598
    edited August 2012 Accepted Answer

    @iTouchGamer

    Hi, you'll still need to change score1 to score2 each by hand I'm afraid, but...

    If your levels are similar with just a few changes per scene, then rather than copying and pasting everything from one scene to another, just duplicate scenes in the Home window (alt + drag). As I say, you'll still have to change attributes but by the sound of it, will save you a ton of time copying and pasting rules/actors, etc if the majority is similar level to level...

    Also: sometimes (I find a lot of times, personally) that using the Custom Behaviours facility is a bit quicker than copy and paste when it comes to getting large amounts of rules copied over. And perhaps get into the habit of enclosing multiple rules in group behaviours, so you can grab large chunks of rules in one go to drag into the custom behaviours.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Posts: 6,598
    edited August 2012 Accepted Answer

    You're welcome. :) And yes you're right, it'd be great for some sort of attributes find and replace... maybe one day.

    Also, what is the Custom Behaviours facility?
    OK, Custom Behaviours: In the Library, either in the Scene Edit or Actor Edit window, next to the Standard tab, there is a tab called Custom. Click on that; then when in an Actor Edit window, Shift click to select as many rules&behaviours as you need to be the same somewhere else. Then drag to the Custom window and let go. You can double-click the name of the group to change it if you want.

    Now when you go to another actor edit window where you want this stuff as well, drag it out into the rules section, then it's all done. :-)

    PS I've always thought "Custom" behaviours was a bit misleading as a title; it makes it sound like its for your own behaviours somehow made!

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Posts: 6,598
    Accepted Answer
    @gyroscope

    Oh, those!! haha I knew that ;)

    Ah, you forgot about them because the weather's too hot, didn't you? ;-) I forget stuff because... er....um.... I'll let you know when I remember....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Posts: 6,598
    edited August 2012 Accepted Answer

    That's it, yes – I get the impression that the Group behaviour is ignored by a lot of people but it's really helpful in quite a few ways - not only for selecting a group of rules and behaviours in one hit for copying; or dragging/alt-dragging between game files; or simply for deleting a lot in one go after just selecting the group; as well as ease of dragging to custom behaviours –– but can be titled like all other behaviours for ease of finding rules and behaviours that "belong to each other".

    Hail the humble Group behaviour!

    PS I'll mention @MotherHoose and @TheMoonwalls who helped you out here as well. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Answers

  • MotherHooseMotherHoose Member Posts: 2,456
    when you just change the name of an Attribute
    … GS changes all references to new name (no work for you)

    when you drag a behavior into an Actor … name it!
    in the tittle bar: Change Attribute: alpha … or Constrain Attribute: X

    when you create a Rule or Group … name it!
    in the tittle bar:
    Rule: alpha = 0; touch ➢ alpha to 1
    Group: Movement

    naming things right away … keeps you focused on what you are doing here
    seconds spent typing makes your working and debugging and cleaningUp much faster

    you can test if an attribute is used … by saving your work as a new project
    then trying to delete an attribute in game/scene …
    GS will Alert you where the attribute is in use … if it is

    and, of course you can look at the content of your project
    and, make changes in a textEditor or program that searches/replaces in multiple files

    image MH
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    You can also use a tool called GS Project Attributes from Deep Blue Apps - it's great, and let you change attributes really quick - it often saves my time :)
  • iTouchGameriTouchGamer Member Posts: 681
    edited August 2012
    @MotherHoose

    Hmm maybe I'm not explaining it correctly..

    Example:

    Ok I have 2 attributes-Score1 and Score2

    2 Scenes-Level1 and Level2.

    Let's say I have a rule in level1 that changes score1 based on something that happened in that level. Now I copy that rule, and paste in in level2. Is there a way to "Find" everywhere it has score1 in the rule, and change it to score2?? I know I could do it manually, but in my game I have almost 50 levels and it's a pain to go "Copy...Paste..change attribute" all day long!

    Thanks!

    Like this in MSW:
    http://images.yourdictionary.com/images/computer/_WDFIND.GIF
  • iTouchGameriTouchGamer Member Posts: 681
    @gyroscope

    Yea, that's what I was afraid of. The scenes are no where near similar so it looks like I'll have to do it all manually :(

    Hopefully GS will implement something similar to Find and Replace...

    Thanks!

    Also, what is the Custom Behaviours facility?
  • MotherHooseMotherHoose Member Posts: 2,456
    @iTouchGamer
    save a copy of your project
    in Inspector: gameAttributes:
    highlight score1
    click the [-] or keyboard delete
    GS will Alert you with a list of all the Actors that reference that attribute
    (screenshot that alert … or write down those actors)
    cancel the alert

    working from your screenshot or list
    in those actors … find and change the attribute

    image MH
  • iTouchGameriTouchGamer Member Posts: 681
    @MotherHoose

    I know which actors the attributes are in, I'm copying and pasting the attributes in different scenes.

    Thanks though!
  • iTouchGameriTouchGamer Member Posts: 681
    @gyroscope

    Oh, those!! haha I knew that ;)

    That might actually be a whole lot easier than copying and pasting!

    Thanks!!
  • iTouchGameriTouchGamer Member Posts: 681
    @gyroscope

    Oh, those!! haha I knew that ;)

    Ah, you forgot about them because the weather's too hot, didn't you? ;-) I forget stuff because... er....um.... I'll let you know when I remember....
    Hah, good one!
  • iTouchGameriTouchGamer Member Posts: 681
    @gyroscope

    If I have like 4 or 5 rules, is there a way to "group" them so I don't have to make all of them custom rules??

    Is that what the group rule is for?
  • iTouchGameriTouchGamer Member Posts: 681

    That's it, yes – I get the impression that the Group behaviour is ignored by a lot of people but it's really helpful in quite a few ways - not only for selecting a group of rules and behaviours in one hit for copying; or dragging/alt-dragging between game files; or simply for deleting a lot in one go after just selecting the group; as well as ease of dragging to custom behaviours –– but can be titled like all other behaviours for ease of finding rules and behaviours that "belong to each other".

    Hail the humble Group behaviour!

    PS I'll mention @MotherHoose and @TheMoonwalls who helped you out here as well. :-)
    @gyroscope

    Great, thanks again for all your help!!
Sign In or Register to comment.