ReDraw Actor

Ideas for Game Editor evolution.

ReDraw Actor

Postby scottieb » Tue Dec 25, 2007 11:10 pm

I think one of the largest problems with all video games AI and I am new at this so it is really difficult. I think if GE had an option to redraw an actor in the events list it would make AI alot easier. I think the usual way of doing this would be through script, but a lot of people don't know script like me. Maybe this can be done through conditonal actions or something, but I would like there to be a way to change the behavior easier. If any one could give me some code for this I apprieciate it.
scottieb
 
Posts: 7
Joined: Fri Nov 23, 2007 3:01 am
Score: 0 Give a positive score

Re: ReDraw Actor

Postby Fuzzy » Wed Dec 26, 2007 11:55 am

What do you mean redraw? The actor will be redrawn in the next frame.. What different effect do you need?
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: ReDraw Actor

Postby kirby » Thu Dec 27, 2007 7:17 pm

Redraw actor?? Wait wait... what do you mean? :P (Sorry could you explain?)
kirby
 
Posts: 121
Joined: Wed Nov 14, 2007 3:32 am
Score: 6 Give a positive score

Re: ReDraw Actor

Postby scottieb » Fri Dec 28, 2007 8:48 pm

If you go the actor control screne and to add events you have the list of things to add. One of them is draw actor. I think they should add Redraw actor. If the actor has a collision then it is redrawn and it's behavior is changed. They would save writing out code for those who are challenged with that. It doesn't have to be called Redraw actor either. Ok there is an event and that causes the actor to stop useing a script and switches to another script and changes the actors behavior.
scottieb
 
Posts: 7
Joined: Fri Nov 23, 2007 3:01 am
Score: 0 Give a positive score

Re: ReDraw Actor

Postby Troodon » Fri Dec 28, 2007 10:09 pm

You can do this by adding in the draw actor:

if (redrawVariable == 1)
{
//draw actor things;
}

if(redrawVariable == 2)
{
//redraw actor things;
}

etc etc
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: ReDraw Actor

Postby Bee-Ant » Sat Dec 29, 2007 2:44 am

:lol: that code would make him confused :lol:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: ReDraw Actor

Postby kirby » Sat Dec 29, 2007 4:26 am

:lol: Oh oh...? Whats that?
kirby
 
Posts: 121
Joined: Wed Nov 14, 2007 3:32 am
Score: 6 Give a positive score

Re: ReDraw Actor

Postby Lightboy » Sat Dec 29, 2007 4:35 am

Do you meant
AnyActor>DrawActor>DrawActor>
I bring light all the way
User avatar
Lightboy
 
Posts: 3
Joined: Mon Oct 29, 2007 2:19 pm
Location: Rainbow of Heaven
Score: 0 Give a positive score

Re: ReDraw Actor

Postby Fuzzy » Sat Dec 29, 2007 8:06 am

Here is the order of operations.

1. GE calls draw actor for the view.
2. view draw actor runs any code that you type in.
3. view draw actor commands each actor in view to draw itself.
4. the actor execute the code that you put in your draw actor event for that actor.
5. the actor now draws itself.
6. the next actor starts step 4.
7. when all the actors are drawn, control is passed back to draw actor->view.
8. It does stuff like figure out who is still in view and builds a list for the next frame draw.
9. GE processes the other events.
10. start at step 1 again.

Its not perfect, but pretty close to that. only makslane knows for sure. But by this you can see that a redraw or refresh dont make much sense.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: ReDraw Actor

Postby Troodon » Sat Dec 29, 2007 1:15 pm

Fuzzy wrote:Here is the order of operations.

1. GE calls draw actor for the view.
2. view draw actor runs any code that you type in.
3. view draw actor commands each actor in view to draw itself.
4. the actor execute the code that you put in your draw actor event for that actor.
5. the actor now draws itself.
6. the next actor starts step 4.
7. when all the actors are drawn, control is passed back to draw actor->view.
8. It does stuff like figure out who is still in view and builds a list for the next frame draw.
9. GE processes the other events.
10. start at step 1 again.

Its not perfect, but pretty close to that. only makslane knows for sure. But by this you can see that a redraw or refresh dont make much sense.


Perfectly explained. But Scottieb just wanted to define actor behaviour with a variable. And since he didn't know how to call it he used term "redraw".
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: ReDraw Actor

Postby MrScience101 » Sat Dec 29, 2007 2:03 pm

I think it would be great if you could force an actor to update and redraw itself. For instance in the global code if you could type:

actor1.textNumber = 50;

and then type:

actor1.update(); //Forces the actor to update.

That way you could use a lot more global code.
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: ReDraw Actor

Postby Troodon » Sat Dec 29, 2007 2:13 pm

What do you mean? Can't you just do this by retyping the command?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: ReDraw Actor

Postby MrScience101 » Sat Dec 29, 2007 11:58 pm

hmm if I make a GLOBAL function called Update() in the script editor like so:

void Update()
{
actor1.textNumber = 5;
}

and then I call the Update function from within a local actor like:

//script editor mouse down -> left on actor2

actor2. x = 50;
Update();

Then actor1's text number is not updated. It will still display as 0 even though actor1.textNumber actually equals 5;

Hope that helps.
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: ReDraw Actor

Postby Fuzzy » Sun Dec 30, 2007 2:45 am

Correct. You cannot explicitly refer to an actor in global code. Actor1 in your example would point to null as actor1's create actor function has not been called yet.

When we define an actor, we are really defining a prototype. It happens that an instance is created too, unless you select "create at start up <no>".

To solve your problem you can rewrite that function using pointers.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest