Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Enemy wont use item [SOLVED]

Chat and ask questions about the RPG Maker Mode here.
gametechish
Member
Member
Posts: 6
Joined: March 31st, 2013, 10:32 am
Name: William Province

Enemy wont use item [SOLVED]

Post by gametechish »

My enemy wont use any item I give him but he will chase me down. here I'll post the code.

Code: Select all

include scripts/1

r_script_signal talk [
  if (!= (r_get_faction self) (r_get_faction actor)) [
    r_action_clear self
    r_action_attack self actor
  ]
]

r_script_signal hit [
  if (!= (r_get_faction self) (r_get_faction actor)) [
    r_action_clear self
    r_action_attack self actor
  ]
]

r_script_signal update [
  if (r_cansee self player) [
    r_action_clear self
    r_action_attack self player 1
  ]
]

r_script_signal collide [
  if (!= (r_get_faction self) (r_get_faction actor)) [
    r_action_clear self
    r_action_attack self actor
  ]
]

r_script_signal spawn [
  r_action_wander self 0 96 0
  r_additem self 8 1
  r_equip self 0
]
Can someone please help soon I even use the RPG tutorial for the enemy just renamed the enemy. I can use the weapon if i kill him. I am really calling for help now. Please anyone. :cry:
Last edited by gametechish on April 1st, 2013, 6:15 am, edited 1 time in total.
User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Enemy wont use item

Post by kddekadenz »

Code: Select all

r_script_signal spawn [
  r_action_wander self 0 96 0
  r_additem self 8 1
  r_equip self 0
  ]
This part is outdated. I'm not sure about the wander command, I never really used it.
The equip stuff needs to be handled the following way:

Code: Select all

r_script_signal spawn [
 r_additem self 8 1 [ r_equip actor self 0 ]
]
Kelgar is an advanced RPG beeing developed in Sandbox
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Enemy wont use item

Post by Hirato »

If it's not that, make sure there are NON-FRIENDLY STATUS EFFECTS assigned onto the weapon you're trying to equip
This is not a url, clicking it is pointless
gametechish
Member
Member
Posts: 6
Joined: March 31st, 2013, 10:32 am
Name: William Province

Re: Enemy wont use item

Post by gametechish »

Thank you it now works some one should update the wiki but do Dragons automatically fly or do they need a script if so can someone help me out with this
User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Enemy wont use item [SOLVED]

Post by kddekadenz »

Erh, what?
Kelgar is an advanced RPG beeing developed in Sandbox
gametechish
Member
Member
Posts: 6
Joined: March 31st, 2013, 10:32 am
Name: William Province

Re: Enemy wont use item [SOLVED]

Post by gametechish »

when you make a script and use the model for the dragon will the dragon automatically fly up and chase you or will it just stay on the ground
personman61
Member
Member
Posts: 14
Joined: January 27th, 2013, 5:31 am
Name: jeremy

Re: Enemy wont use item [SOLVED]

Post by personman61 »

The dragon model just looks like its flying, but i don't know how to script it to fly.
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Enemy wont use item [SOLVED]

Post by Leo_V117 »

I think you have to script that... It isn't actually part of the default engine scripting for a dragon, or any creature for that matter, to fly.
User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: Enemy wont use item [SOLVED]

Post by kddekadenz »

You simply could "fake" flying by increasing the Z value of the model. This can be either done by using a 3D modeling program, such as Blender, or by adding to the cfg of the dragon model (I think it is located in packages/models/rpg/) something like this:

Code: Select all

mdltrans 0 0 40
http://sauerbraten.org/docs/models.html#mdltrans wrote:mdltrans X Y Z

Translate the model's center by (X, Y, Z), where X/Y/Z are in model units.
Kelgar is an advanced RPG beeing developed in Sandbox
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Enemy wont use item [SOLVED]

Post by Leo_V117 »

This could work, but it would be unwise as you would have to package the model as part of your game when you release.
Post Reply