I need to set a faction to hate me as soon as I enter the game, for example; walking around a nice field you come across a nasty wolf... we he doesn't want to attack me unless I attack him first. But i would like it so that from the start of the game he wants to kill me with no way to change the faction.
Secondly I'm having some trouble in 1.2.8 with giving enemies weapons. For example I'd like to make a fire breathing dragon, I followed the RPG tutorial and all i get is an error in game:
Code: Select all
//Dragon Script
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 50 0
r_additem self 2 1
r_equip self 2 0
]
Code: Select all
r_equip; invalid reference "2" or of incompatible type
I'm currently just testing it with the tutorial "fangs" and then I will change it later once i can get it working.
Code: Select all
r_item_name "Fangs"
r_item_description "If you see this, submit a bug report."
r_item_use_new_weapon // 0
r_item_use_cooldown 100
r_item_use_chargeflags $CHARGE_MAG
r_item_use_new_status 1 $ATTACK_SLASH .075
r_item_use_slots (| $SLOT_LHAND $SLOT_RHAND |)
r_item_use_skill $SKILL_MELEE
r_item_use_range 4
r_item_use_angle 8 //degrees
r_item_use_lifetime 0
r_item_use_cost 0
r_item_use_target $T_HORIZ
r_item_use_recoil -10
r_item_use_projeffect -1
r_item_use_traileffect -1
r_item_use_deatheffect -1