ego533
New member
- Joined
- May 10, 2011
- Messages
- 91
So, I don't know if this has been known or previously solved here. I looked and could not find any information:
When loading a creature for the player on a custom map, either through a 'creature select' script or a simple creation and assignment, I've noticed that the creature seemed to be 'dumb'. It does not really learn any actions and cannot be correctly taught by the player. Using the save/load my_creature commands on the same map will solve this. The resulting loaded creature will be 'smart,' having the regular abilities to learn tasks and learn from the player.
"LANDNUM" refers to the number assigned to the land map.
-ego533
When loading a creature for the player on a custom map, either through a 'creature select' script or a simple creation and assignment, I've noticed that the creature seemed to be 'dumb'. It does not really learn any actions and cannot be correctly taught by the player. Using the save/load my_creature commands on the same map will solve this. The resulting loaded creature will be 'smart,' having the regular abilities to learn tasks and learn from the player.
"LANDNUM" refers to the number assigned to the land map.
Code:
Town1 = get town with id 0
creaturePen1 = get building ABODE_NUMBER_CREATURE_PEN in Town1 min built 1.0
tempCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {creaturePen1} using only alignment good neutral evil
set player 0 creature to tempCreature
run map script line "SET_LAND_NUMBER( LANDNUM - 1 )"
wait 1 seconds
save my_creature
wait 3 seconds
run map script line "SET_LAND_NUMBER( LANDNUM )"
delete tempCreature
wait 1 seconds
load my_creature at {creaturePen1}
myCreature = get player 0 creature
-ego533