Heir of the Wilds has a triggered ferocious ability with an intervening “if” clause. That ability will check if you control a creature with power 4 or greater whenever Heir of the Wilds attacks. If you don’t at that time, the ability won’t trigger at all. If it triggers, the ability will also check if you control a creature with power 4 or greater as it resolves. If you don’t at that time, the ability won’t do anything. Note that the creature with power 4 or greater you control as the ability triggers doesn’t necessarily have to be the same one you control as the ability resolves.